Skip to content

Commit 729ba06

Browse files
authored
Remove unsupported *vfp functions (#678)
Remove all *vfp functions and related tests since LLVM no longer emits them. Link: #626 [ Reword commit message - Trevor ]
1 parent 6bec9db commit 729ba06

File tree

13 files changed

+37
-191
lines changed

13 files changed

+37
-191
lines changed

README.md

+37-34
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ rely on CI.
103103
- [x] aarch64/chkstk.S
104104
- [x] adddf3.c
105105
- [x] addsf3.c
106-
- [x] arm/adddf3vfp.S
107106
- [x] arm/addsf3.S
108-
- [x] arm/addsf3vfp.S
109107
- [x] arm/aeabi_dcmp.S
110108
- [x] arm/aeabi_fcmp.S
111109
- [x] arm/aeabi_idivmod.S
@@ -116,45 +114,13 @@ rely on CI.
116114
- [x] arm/aeabi_uidivmod.S
117115
- [x] arm/aeabi_uldivmod.S
118116
- [ ] arm/chkstk.S
119-
- [x] arm/divdf3vfp.S
120117
- [ ] arm/divmodsi4.S (generic version is done)
121-
- [x] arm/divsf3vfp.S
122118
- [ ] arm/divsi3.S (generic version is done)
123-
- [x] arm/eqdf2vfp.S
124-
- [x] arm/eqsf2vfp.S
125-
- [x] arm/extendsfdf2vfp.S
126-
- [ ] arm/fixdfsivfp.S
127-
- [ ] arm/fixsfsivfp.S
128-
- [ ] arm/fixunsdfsivfp.S
129-
- [ ] arm/fixunssfsivfp.S
130-
- [ ] arm/floatsidfvfp.S
131-
- [ ] arm/floatsisfvfp.S
132-
- [ ] arm/floatunssidfvfp.S
133-
- [ ] arm/floatunssisfvfp.S
134-
- [x] arm/gedf2vfp.S
135-
- [x] arm/gesf2vfp.S
136-
- [x] arm/gtdf2vfp.S
137-
- [x] arm/gtsf2vfp.S
138-
- [x] arm/ledf2vfp.S
139-
- [x] arm/lesf2vfp.S
140-
- [x] arm/ltdf2vfp.S
141-
- [x] arm/ltsf2vfp.S
142119
- [ ] arm/modsi3.S (generic version is done)
143-
- [x] arm/muldf3vfp.S
144-
- [x] arm/mulsf3vfp.S
145-
- [x] arm/nedf2vfp.S
146-
- [ ] arm/negdf2vfp.S
147-
- [ ] arm/negsf2vfp.S
148-
- [x] arm/nesf2vfp.S
149120
- [x] arm/softfloat-alias.list
150-
- [x] arm/subdf3vfp.S
151-
- [x] arm/subsf3vfp.S
152-
- [x] arm/truncdfsf2vfp.S
153121
- [ ] arm/udivmodsi4.S (generic version is done)
154122
- [ ] arm/udivsi3.S (generic version is done)
155123
- [ ] arm/umodsi3.S (generic version is done)
156-
- [ ] arm/unorddf2vfp.S
157-
- [ ] arm/unordsf2vfp.S
158124
- [x] ashldi3.c
159125
- [x] ashrdi3.c
160126
- [ ] avr/divmodhi4.S
@@ -501,6 +467,43 @@ Floating-point implementations of builtins that are only called from soft-float
501467
- ~~x86_64/floatdidf.c~~
502468
- ~~x86_64/floatdisf.c~~
503469

470+
Unsupported in any current target: used on old versions of 32-bit iOS with ARMv5.
471+
472+
- ~~arm/adddf3vfp.S~~
473+
- ~~arm/addsf3vfp.S~~
474+
- ~~arm/divdf3vfp.S~~
475+
- ~~arm/divsf3vfp.S~~
476+
- ~~arm/eqdf2vfp.S~~
477+
- ~~arm/eqsf2vfp.S~~
478+
- ~~arm/extendsfdf2vfp.S~~
479+
- ~~arm/fixdfsivfp.S~~
480+
- ~~arm/fixsfsivfp.S~~
481+
- ~~arm/fixunsdfsivfp.S~~
482+
- ~~arm/fixunssfsivfp.S~~
483+
- ~~arm/floatsidfvfp.S~~
484+
- ~~arm/floatsisfvfp.S~~
485+
- ~~arm/floatunssidfvfp.S~~
486+
- ~~arm/floatunssisfvfp.S~~
487+
- ~~arm/gedf2vfp.S~~
488+
- ~~arm/gesf2vfp.S~~
489+
- ~~arm/gtdf2vfp.S~~
490+
- ~~arm/gtsf2vfp.S~~
491+
- ~~arm/ledf2vfp.S~~
492+
- ~~arm/lesf2vfp.S~~
493+
- ~~arm/ltdf2vfp.S~~
494+
- ~~arm/ltsf2vfp.S~~
495+
- ~~arm/muldf3vfp.S~~
496+
- ~~arm/mulsf3vfp.S~~
497+
- ~~arm/nedf2vfp.S~~
498+
- ~~arm/negdf2vfp.S~~
499+
- ~~arm/negsf2vfp.S~~
500+
- ~~arm/nesf2vfp.S~~
501+
- ~~arm/subdf3vfp.S~~
502+
- ~~arm/subsf3vfp.S~~
503+
- ~~arm/truncdfsf2vfp.S~~
504+
- ~~arm/unorddf2vfp.S~~
505+
- ~~arm/unordsf2vfp.S~~
506+
504507
## License
505508

506509
The compiler-builtins crate is dual licensed under both the University of

src/float/add.rs

-10
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

-51
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

-10
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

-5
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

-10
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

-10
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

-5
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

-10
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,3 @@ mod float_addsub_f128_ppc {
139139
f128, __addkf3, __subkf3, Quad, not(feature = "no-sys-f128");
140140
}
141141
}
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-
}

testcrate/tests/cmp.rs

-14
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

-12
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! {

testcrate/tests/div_rem.rs

-10
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,3 @@ mod float_div {
156156
f64, __divdf3, Double, all();
157157
}
158158
}
159-
160-
#[cfg(target_arch = "arm")]
161-
mod float_div_arm {
162-
use super::*;
163-
164-
float! {
165-
f32, __divsf3vfp, Single, all();
166-
f64, __divdf3vfp, Double, all();
167-
}
168-
}

testcrate/tests/mul.rs

-10
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,3 @@ mod float_mul_f128_ppc {
153153
f128, __mulkf3, Quad, not(feature = "no-sys-f128");
154154
}
155155
}
156-
157-
#[cfg(target_arch = "arm")]
158-
mod float_mul_arm {
159-
use super::*;
160-
161-
float_mul! {
162-
f32, __mulsf3vfp, Single, all();
163-
f64, __muldf3vfp, Double, all();
164-
}
165-
}

0 commit comments

Comments
 (0)