File tree 4 files changed +720
-729
lines changed
4 files changed +720
-729
lines changed Original file line number Diff line number Diff line change 4
4
//!
5
5
//! Intrinsics that could live here:
6
6
//!
7
- //! - __smulbb
8
- //! - __smulbt
9
- //! - __smultb
10
- //! - __smultt
11
- //! - __smulwb
12
- //! - __smulwt
13
- //! - __qadd
14
- //! - __qsub
15
- //! - __qdbl
16
- //! - __smlabb
17
- //! - __smlabt
18
- //! - __smlatb
19
- //! - __smlatt
20
- //! - __smlawb
21
- //! - __smlawt
7
+ //! - [ ] __smulbb
8
+ //! - [ ] __smulbt
9
+ //! - [ ] __smultb
10
+ //! - [ ] __smultt
11
+ //! - [ ] __smulwb
12
+ //! - [ ] __smulwt
13
+ //! - [x] __qadd
14
+ //! - [x] __qsub
15
+ //! - [ ] __qdbl
16
+ //! - [ ] __smlabb
17
+ //! - [ ] __smlabt
18
+ //! - [ ] __smlatb
19
+ //! - [ ] __smlatt
20
+ //! - [ ] __smlawb
21
+ //! - [ ] __smlawt
22
+
23
+ extern "C" {
24
+ #[ link_name = "llvm.arm.qadd" ]
25
+ fn arm_qadd ( a : i32 , b : i32 ) -> i32 ;
26
+
27
+ #[ link_name = "llvm.arm.qsub" ]
28
+ fn arm_qsub ( a : i32 , b : i32 ) -> i32 ;
29
+
30
+ }
31
+
32
+ /// Signed saturating addition
33
+ ///
34
+ /// Returns the 32-bit saturating signed equivalent of a + b.
35
+ #[ inline]
36
+ #[ cfg_attr( test, assert_instr( qadd) ) ]
37
+ pub unsafe fn qadd ( a : i32 , b : i32 ) -> i32 {
38
+ arm_qadd ( a, b)
39
+ }
40
+
41
+ /// Signed saturating subtraction
42
+ ///
43
+ /// Returns the 32-bit saturating signed equivalent of a - b.
44
+ #[ inline]
45
+ #[ cfg_attr( test, assert_instr( qsub) ) ]
46
+ pub unsafe fn qsub ( a : i32 , b : i32 ) -> i32 {
47
+ arm_qsub ( a, b)
48
+ }
You can’t perform that action at this time.
0 commit comments