Skip to content

Commit 1c6113f

Browse files
folkertdevAmanieu
authored andcommitted
powerpc: use simd_ceil and simd_floor
1 parent eb1b14b commit 1c6113f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

crates/core_arch/src/powerpc/altivec.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ unsafe extern "C" {
234234
#[link_name = "llvm.ppc.altivec.vavguw"]
235235
fn vavguw(a: vector_unsigned_int, b: vector_unsigned_int) -> vector_unsigned_int;
236236

237-
#[link_name = "llvm.ceil.v4f32"]
238-
fn vceil(a: vector_float) -> vector_float;
239-
240237
#[link_name = "llvm.ppc.altivec.vcmpbfp"]
241238
fn vcmpbfp(a: vector_float, b: vector_float) -> vector_signed_int;
242239

@@ -274,9 +271,6 @@ unsafe extern "C" {
274271
#[link_name = "llvm.ppc.altivec.vexptefp"]
275272
fn vexptefp(a: vector_float) -> vector_float;
276273

277-
#[link_name = "llvm.floor.v4f32"]
278-
fn vfloor(a: vector_float) -> vector_float;
279-
280274
#[link_name = "llvm.ppc.altivec.vcmpequb.p"]
281275
fn vcmpequb_p(cr: i32, a: vector_unsigned_char, b: vector_unsigned_char) -> i32;
282276
#[link_name = "llvm.ppc.altivec.vcmpequh.p"]
@@ -768,7 +762,7 @@ mod sealed {
768762
impl_vec_xst! { vec_xst_u32 stxvd2x / stxv u32 }
769763
impl_vec_xst! { vec_xst_f32 stxvd2x / stxv f32 }
770764

771-
test_impl! { vec_floor(a: vector_float) -> vector_float [ vfloor, vrfim / xvrspim ] }
765+
test_impl! { vec_floor(a: vector_float) -> vector_float [ simd_floor, vrfim / xvrspim ] }
772766

773767
test_impl! { vec_vexptefp(a: vector_float) -> vector_float [ vexptefp, vexptefp ] }
774768

@@ -1302,7 +1296,7 @@ mod sealed {
13021296
}
13031297
}
13041298

1305-
test_impl! { vec_vceil(a: vector_float) -> vector_float [vceil, vrfip / xvrspip ] }
1299+
test_impl! { vec_vceil(a: vector_float) -> vector_float [simd_ceil, vrfip / xvrspip ] }
13061300

13071301
test_impl! { vec_vavgsb(a: vector_signed_char, b: vector_signed_char) -> vector_signed_char [ vavgsb, vavgsb ] }
13081302
test_impl! { vec_vavgsh(a: vector_signed_short, b: vector_signed_short) -> vector_signed_short [ vavgsh, vavgsh ] }

0 commit comments

Comments
 (0)