Skip to content

Commit 63e1dd7

Browse files
committed
remove all *vfp fn as @Amanieu asks. Remove tests too.
1 parent 61c5764 commit 63e1dd7

File tree

12 files changed

+2
-159
lines changed

12 files changed

+2
-159
lines changed

src/float/add.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,4 @@ intrinsics! {
208208
pub extern "C" fn __addtf3(a: f128, b: f128) -> f128 {
209209
add(a, b)
210210
}
211-
212-
#[cfg(target_arch = "arm")]
213-
pub extern "C" fn __addsf3vfp(a: f32, b: f32) -> f32 {
214-
a + b
215-
}
216-
217-
#[cfg(target_arch = "arm")]
218-
pub extern "C" fn __adddf3vfp(a: f64, b: f64) -> f64 {
219-
a + b
220-
}
221211
}

src/float/cmp.rs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -258,55 +258,4 @@ intrinsics! {
258258
pub extern "aapcs" fn __aeabi_dcmpgt(a: f64, b: f64) -> i32 {
259259
(__gtdf2(a, b) > 0) as i32
260260
}
261-
262-
// On hard-float targets LLVM will use native instructions
263-
// for all VFP intrinsics below
264-
265-
pub extern "C" fn __gesf2vfp(a: f32, b: f32) -> i32 {
266-
(a >= b) as i32
267-
}
268-
269-
pub extern "C" fn __gedf2vfp(a: f64, b: f64) -> i32 {
270-
(a >= b) as i32
271-
}
272-
273-
pub extern "C" fn __gtsf2vfp(a: f32, b: f32) -> i32 {
274-
(a > b) as i32
275-
}
276-
277-
pub extern "C" fn __gtdf2vfp(a: f64, b: f64) -> i32 {
278-
(a > b) as i32
279-
}
280-
281-
pub extern "C" fn __ltsf2vfp(a: f32, b: f32) -> i32 {
282-
(a < b) as i32
283-
}
284-
285-
pub extern "C" fn __ltdf2vfp(a: f64, b: f64) -> i32 {
286-
(a < b) as i32
287-
}
288-
289-
pub extern "C" fn __lesf2vfp(a: f32, b: f32) -> i32 {
290-
(a <= b) as i32
291-
}
292-
293-
pub extern "C" fn __ledf2vfp(a: f64, b: f64) -> i32 {
294-
(a <= b) as i32
295-
}
296-
297-
pub extern "C" fn __nesf2vfp(a: f32, b: f32) -> i32 {
298-
(a != b) as i32
299-
}
300-
301-
pub extern "C" fn __nedf2vfp(a: f64, b: f64) -> i32 {
302-
(a != b) as i32
303-
}
304-
305-
pub extern "C" fn __eqsf2vfp(a: f32, b: f32) -> i32 {
306-
(a == b) as i32
307-
}
308-
309-
pub extern "C" fn __eqdf2vfp(a: f64, b: f64) -> i32 {
310-
(a == b) as i32
311-
}
312261
}

src/float/div.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -926,14 +926,4 @@ intrinsics! {
926926
pub extern "C" fn __divdf3(a: f64, b: f64) -> f64 {
927927
div64(a, b)
928928
}
929-
930-
#[cfg(target_arch = "arm")]
931-
pub extern "C" fn __divsf3vfp(a: f32, b: f32) -> f32 {
932-
a / b
933-
}
934-
935-
#[cfg(target_arch = "arm")]
936-
pub extern "C" fn __divdf3vfp(a: f64, b: f64) -> f64 {
937-
a / b
938-
}
939929
}

src/float/extend.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ intrinsics! {
7676
pub extern "C" fn __extendsfdf2(a: f32) -> f64 {
7777
extend(a)
7878
}
79-
80-
#[cfg(target_arch = "arm")]
81-
pub extern "C" fn __extendsfdf2vfp(a: f32) -> f64 {
82-
a as f64 // LLVM generate 'fcvtds'
83-
}
8479
}
8580

8681
intrinsics! {

src/float/mul.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,4 @@ intrinsics! {
199199
pub extern "C" fn __multf3(a: f128, b: f128) -> f128 {
200200
mul(a, b)
201201
}
202-
203-
#[cfg(target_arch = "arm")]
204-
pub extern "C" fn __mulsf3vfp(a: f32, b: f32) -> f32 {
205-
a * b
206-
}
207-
208-
#[cfg(target_arch = "arm")]
209-
pub extern "C" fn __muldf3vfp(a: f64, b: f64) -> f64 {
210-
a * b
211-
}
212202
}

src/float/sub.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,4 @@ intrinsics! {
2323

2424
__addtf3(a, f128::from_repr(b.repr() ^ f128::SIGN_MASK))
2525
}
26-
27-
#[cfg(target_arch = "arm")]
28-
pub extern "C" fn __subsf3vfp(a: f32, b: f32) -> f32 {
29-
a - b
30-
}
31-
32-
#[cfg(target_arch = "arm")]
33-
pub extern "C" fn __subdf3vfp(a: f64, b: f64) -> f64 {
34-
a - b
35-
}
3626
}

src/float/trunc.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,6 @@ intrinsics! {
124124
pub extern "C" fn __truncdfsf2(a: f64) -> f32 {
125125
trunc(a)
126126
}
127-
128-
#[cfg(target_arch = "arm")]
129-
pub extern "C" fn __truncdfsf2vfp(a: f64) -> f32 {
130-
a as f32
131-
}
132127
}
133128

134129
intrinsics! {

testcrate/tests/addsub.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,4 @@ mod float_addsub_f128_ppc {
138138
float_sum! {
139139
f128, __addkf3, __subkf3, Quad, not(feature = "no-sys-f128");
140140
}
141-
}
142-
143-
#[cfg(target_arch = "arm")]
144-
mod float_addsub_arm {
145-
use super::*;
146-
147-
float_sum! {
148-
f32, __addsf3vfp, __subsf3vfp, Single, all();
149-
f64, __adddf3vfp, __subdf3vfp, Double, all();
150-
}
151-
}
141+
}

testcrate/tests/cmp.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ mod float_comparisons_arm {
156156
fn cmp_f32() {
157157
use compiler_builtins::float::cmp::{
158158
__aeabi_fcmpeq, __aeabi_fcmpge, __aeabi_fcmpgt, __aeabi_fcmple, __aeabi_fcmplt,
159-
__eqsf2vfp, __gesf2vfp, __gtsf2vfp, __lesf2vfp, __ltsf2vfp, __nesf2vfp,
160159
};
161160

162161
fuzz_float_2(N, |x: f32, y: f32| {
@@ -166,12 +165,6 @@ mod float_comparisons_arm {
166165
0, x == y, __aeabi_fcmpeq;
167166
0, x >= y, __aeabi_fcmpge;
168167
0, x > y, __aeabi_fcmpgt;
169-
0, x < y, __ltsf2vfp;
170-
0, x <= y, __lesf2vfp;
171-
0, x == y, __eqsf2vfp;
172-
0, x >= y, __gesf2vfp;
173-
0, x > y, __gtsf2vfp;
174-
1, x != y, __nesf2vfp;
175168
);
176169
});
177170
}
@@ -180,7 +173,6 @@ mod float_comparisons_arm {
180173
fn cmp_f64() {
181174
use compiler_builtins::float::cmp::{
182175
__aeabi_dcmpeq, __aeabi_dcmpge, __aeabi_dcmpgt, __aeabi_dcmple, __aeabi_dcmplt,
183-
__eqdf2vfp, __gedf2vfp, __gtdf2vfp, __ledf2vfp, __ltdf2vfp, __nedf2vfp,
184176
};
185177

186178
fuzz_float_2(N, |x: f64, y: f64| {
@@ -190,12 +182,6 @@ mod float_comparisons_arm {
190182
0, x == y, __aeabi_dcmpeq;
191183
0, x >= y, __aeabi_dcmpge;
192184
0, x > y, __aeabi_dcmpgt;
193-
0, x < y, __ltdf2vfp;
194-
0, x <= y, __ledf2vfp;
195-
0, x == y, __eqdf2vfp;
196-
0, x >= y, __gedf2vfp;
197-
0, x > y, __gtdf2vfp;
198-
1, x != y, __nedf2vfp;
199185
);
200186
});
201187
}

testcrate/tests/conv.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,6 @@ mod extend {
258258
f32 => f64, Single => Double, __extendsfdf2, all();
259259
}
260260

261-
#[cfg(target_arch = "arm")]
262-
f_to_f! {
263-
extend,
264-
f32 => f64, Single => Double, __extendsfdf2vfp, all();
265-
}
266-
267261
#[cfg(all(f16_enabled, f128_enabled))]
268262
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
269263
f_to_f! {
@@ -293,12 +287,6 @@ mod trunc {
293287
f64 => f32, Double => Single, __truncdfsf2, all();
294288
}
295289

296-
#[cfg(target_arch = "arm")]
297-
f_to_f! {
298-
trunc,
299-
f64 => f32, Double => Single, __truncdfsf2vfp, all();
300-
}
301-
302290
#[cfg(all(f16_enabled, f128_enabled))]
303291
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
304292
f_to_f! {

0 commit comments

Comments
 (0)