@@ -19,9 +19,6 @@ extern crate panic_handler;
19
19
#[ link( name = "c" ) ]
20
20
extern { }
21
21
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
-
25
22
// Every function in this module maps will be lowered to an intrinsic by LLVM, if the platform
26
23
// doesn't have native support for the operation used in the function. ARM has a naming convention
27
24
// convention for its intrinsics that's different from other architectures; that's why some function
@@ -39,70 +36,40 @@ mod intrinsics {
39
36
}
40
37
41
38
// fixdfdi
42
- #[ cfg( not( thumbv6m) ) ]
43
39
pub fn aeabi_d2l ( x : f64 ) -> i64 {
44
40
x as i64
45
41
}
46
42
47
- #[ cfg( thumbv6m) ]
48
- pub fn aeabi_d2l ( _: f64 ) -> i64 {
49
- 0
50
- }
51
-
52
43
// fixunsdfsi
53
44
pub fn aeabi_d2uiz ( x : f64 ) -> u32 {
54
45
x as u32
55
46
}
56
47
57
48
// fixunsdfdi
58
- #[ cfg( not( thumbv6m) ) ]
59
49
pub fn aeabi_d2ulz ( x : f64 ) -> u64 {
60
50
x as u64
61
51
}
62
52
63
- #[ cfg( thumbv6m) ]
64
- pub fn aeabi_d2ulz ( _: f64 ) -> u64 {
65
- 0
66
- }
67
-
68
53
// adddf3
69
54
pub fn aeabi_dadd ( a : f64 , b : f64 ) -> f64 {
70
55
a + b
71
56
}
72
57
73
58
// eqdf2
74
- #[ cfg( not( thumbv6m) ) ]
75
59
pub fn aeabi_dcmpeq ( a : f64 , b : f64 ) -> bool {
76
60
a == b
77
61
}
78
62
79
- #[ cfg( thumbv6m) ]
80
- pub fn aeabi_dcmpeq ( _: f64 , _: f64 ) -> bool {
81
- true
82
- }
83
-
84
63
// gtdf2
85
- #[ cfg( not( thumbv6m) ) ]
86
64
pub fn aeabi_dcmpgt ( a : f64 , b : f64 ) -> bool {
87
65
a > b
88
66
}
89
67
90
- #[ cfg( thumbv6m) ]
91
- pub fn aeabi_dcmpgt ( _: f64 , _: f64 ) -> bool {
92
- true
93
- }
94
-
95
68
// ltdf2
96
- #[ cfg( not( thumbv6m) ) ]
97
69
pub fn aeabi_dcmplt ( a : f64 , b : f64 ) -> bool {
98
70
a < b
99
71
}
100
72
101
- #[ cfg( thumbv6m) ]
102
- pub fn aeabi_dcmplt ( _: f64 , _: f64 ) -> bool {
103
- true
104
- }
105
-
106
73
// divdf3
107
74
pub fn aeabi_ddiv ( a : f64 , b : f64 ) -> f64 {
108
75
a / b
@@ -129,70 +96,40 @@ mod intrinsics {
129
96
}
130
97
131
98
// fixsfdi
132
- #[ cfg( not( thumbv6m) ) ]
133
99
pub fn aeabi_f2lz ( x : f32 ) -> i64 {
134
100
x as i64
135
101
}
136
102
137
- #[ cfg( thumbv6m) ]
138
- pub fn aeabi_f2lz ( _: f32 ) -> i64 {
139
- 0
140
- }
141
-
142
103
// fixunssfsi
143
104
pub fn aeabi_f2uiz ( x : f32 ) -> u32 {
144
105
x as u32
145
106
}
146
107
147
108
// fixunssfdi
148
- #[ cfg( not( thumbv6m) ) ]
149
109
pub fn aeabi_f2ulz ( x : f32 ) -> u64 {
150
110
x as u64
151
111
}
152
112
153
- #[ cfg( thumbv6m) ]
154
- pub fn aeabi_f2ulz ( _: f32 ) -> u64 {
155
- 0
156
- }
157
-
158
113
// addsf3
159
114
pub fn aeabi_fadd ( a : f32 , b : f32 ) -> f32 {
160
115
a + b
161
116
}
162
117
163
118
// eqsf2
164
- #[ cfg( not( thumbv6m) ) ]
165
119
pub fn aeabi_fcmpeq ( a : f32 , b : f32 ) -> bool {
166
120
a == b
167
121
}
168
122
169
- #[ cfg( thumbv6m) ]
170
- pub fn aeabi_fcmpeq ( _: f32 , _: f32 ) -> bool {
171
- true
172
- }
173
-
174
123
// gtsf2
175
- #[ cfg( not( thumbv6m) ) ]
176
124
pub fn aeabi_fcmpgt ( a : f32 , b : f32 ) -> bool {
177
125
a > b
178
126
}
179
127
180
- #[ cfg( thumbv6m) ]
181
- pub fn aeabi_fcmpgt ( _: f32 , _: f32 ) -> bool {
182
- true
183
- }
184
-
185
128
// ltsf2
186
- #[ cfg( not( thumbv6m) ) ]
187
129
pub fn aeabi_fcmplt ( a : f32 , b : f32 ) -> bool {
188
130
a < b
189
131
}
190
132
191
- #[ cfg( thumbv6m) ]
192
- pub fn aeabi_fcmplt ( _: f32 , _: f32 ) -> bool {
193
- true
194
- }
195
-
196
133
// divsf3
197
134
pub fn aeabi_fdiv ( a : f32 , b : f32 ) -> f32 {
198
135
a / b
0 commit comments