@@ -19,9 +19,6 @@ extern crate panic_handler;
1919#[ link( name = "c" ) ]
2020extern { }
2121
22- // NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even
23- // compiler-rt provides a C/assembly implementation.
24-
2522// Every function in this module maps will be lowered to an intrinsic by LLVM, if the platform
2623// doesn't have native support for the operation used in the function. ARM has a naming convention
2724// convention for its intrinsics that's different from other architectures; that's why some function
@@ -39,70 +36,40 @@ mod intrinsics {
3936 }
4037
4138 // fixdfdi
42- #[ cfg( not( thumbv6m) ) ]
4339 pub fn aeabi_d2l ( x : f64 ) -> i64 {
4440 x as i64
4541 }
4642
47- #[ cfg( thumbv6m) ]
48- pub fn aeabi_d2l ( _: f64 ) -> i64 {
49- 0
50- }
51-
5243 // fixunsdfsi
5344 pub fn aeabi_d2uiz ( x : f64 ) -> u32 {
5445 x as u32
5546 }
5647
5748 // fixunsdfdi
58- #[ cfg( not( thumbv6m) ) ]
5949 pub fn aeabi_d2ulz ( x : f64 ) -> u64 {
6050 x as u64
6151 }
6252
63- #[ cfg( thumbv6m) ]
64- pub fn aeabi_d2ulz ( _: f64 ) -> u64 {
65- 0
66- }
67-
6853 // adddf3
6954 pub fn aeabi_dadd ( a : f64 , b : f64 ) -> f64 {
7055 a + b
7156 }
7257
7358 // eqdf2
74- #[ cfg( not( thumbv6m) ) ]
7559 pub fn aeabi_dcmpeq ( a : f64 , b : f64 ) -> bool {
7660 a == b
7761 }
7862
79- #[ cfg( thumbv6m) ]
80- pub fn aeabi_dcmpeq ( _: f64 , _: f64 ) -> bool {
81- true
82- }
83-
8463 // gtdf2
85- #[ cfg( not( thumbv6m) ) ]
8664 pub fn aeabi_dcmpgt ( a : f64 , b : f64 ) -> bool {
8765 a > b
8866 }
8967
90- #[ cfg( thumbv6m) ]
91- pub fn aeabi_dcmpgt ( _: f64 , _: f64 ) -> bool {
92- true
93- }
94-
9568 // ltdf2
96- #[ cfg( not( thumbv6m) ) ]
9769 pub fn aeabi_dcmplt ( a : f64 , b : f64 ) -> bool {
9870 a < b
9971 }
10072
101- #[ cfg( thumbv6m) ]
102- pub fn aeabi_dcmplt ( _: f64 , _: f64 ) -> bool {
103- true
104- }
105-
10673 // divdf3
10774 pub fn aeabi_ddiv ( a : f64 , b : f64 ) -> f64 {
10875 a / b
@@ -129,70 +96,40 @@ mod intrinsics {
12996 }
13097
13198 // fixsfdi
132- #[ cfg( not( thumbv6m) ) ]
13399 pub fn aeabi_f2lz ( x : f32 ) -> i64 {
134100 x as i64
135101 }
136102
137- #[ cfg( thumbv6m) ]
138- pub fn aeabi_f2lz ( _: f32 ) -> i64 {
139- 0
140- }
141-
142103 // fixunssfsi
143104 pub fn aeabi_f2uiz ( x : f32 ) -> u32 {
144105 x as u32
145106 }
146107
147108 // fixunssfdi
148- #[ cfg( not( thumbv6m) ) ]
149109 pub fn aeabi_f2ulz ( x : f32 ) -> u64 {
150110 x as u64
151111 }
152112
153- #[ cfg( thumbv6m) ]
154- pub fn aeabi_f2ulz ( _: f32 ) -> u64 {
155- 0
156- }
157-
158113 // addsf3
159114 pub fn aeabi_fadd ( a : f32 , b : f32 ) -> f32 {
160115 a + b
161116 }
162117
163118 // eqsf2
164- #[ cfg( not( thumbv6m) ) ]
165119 pub fn aeabi_fcmpeq ( a : f32 , b : f32 ) -> bool {
166120 a == b
167121 }
168122
169- #[ cfg( thumbv6m) ]
170- pub fn aeabi_fcmpeq ( _: f32 , _: f32 ) -> bool {
171- true
172- }
173-
174123 // gtsf2
175- #[ cfg( not( thumbv6m) ) ]
176124 pub fn aeabi_fcmpgt ( a : f32 , b : f32 ) -> bool {
177125 a > b
178126 }
179127
180- #[ cfg( thumbv6m) ]
181- pub fn aeabi_fcmpgt ( _: f32 , _: f32 ) -> bool {
182- true
183- }
184-
185128 // ltsf2
186- #[ cfg( not( thumbv6m) ) ]
187129 pub fn aeabi_fcmplt ( a : f32 , b : f32 ) -> bool {
188130 a < b
189131 }
190132
191- #[ cfg( thumbv6m) ]
192- pub fn aeabi_fcmplt ( _: f32 , _: f32 ) -> bool {
193- true
194- }
195-
196133 // divsf3
197134 pub fn aeabi_fdiv ( a : f32 , b : f32 ) -> f32 {
198135 a / b
0 commit comments