diff options
| author | Taiki Endo <te316e89@gmail.com> | 2024-11-29 03:10:07 +0900 |
|---|---|---|
| committer | Taiki Endo <te316e89@gmail.com> | 2024-11-29 03:10:07 +0900 |
| commit | df8feb5067f99e20059c7ee8021d9ba5273bfe68 (patch) | |
| tree | 16d97d2a36a20201eef685877ec32ef984150d59 /tests | |
| parent | 0f8ebba54a8e41a9daccbbedae88e8798f4557c3 (diff) | |
| download | rust-df8feb5067f99e20059c7ee8021d9ba5273bfe68.tar.gz rust-df8feb5067f99e20059c7ee8021d9ba5273bfe68.zip | |
Support floats in input/output in vector registers of PowerPC inline assembly
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/assembly/asm/powerpc-types.rs | 66 | ||||
| -rw-r--r-- | tests/ui/asm/powerpc/bad-reg.aix64.stderr | 6 | ||||
| -rw-r--r-- | tests/ui/asm/powerpc/bad-reg.powerpc64.stderr | 6 | ||||
| -rw-r--r-- | tests/ui/asm/powerpc/bad-reg.powerpc64le.stderr | 6 |
4 files changed, 75 insertions, 9 deletions
diff --git a/tests/assembly/asm/powerpc-types.rs b/tests/assembly/asm/powerpc-types.rs index d67e0f66f66..aa35c4d8865 100644 --- a/tests/assembly/asm/powerpc-types.rs +++ b/tests/assembly/asm/powerpc-types.rs @@ -225,6 +225,28 @@ check!(vreg_f32x4, f32x4, vreg, "vmr"); #[cfg(vsx)] check!(vreg_f64x2, f64x2, vreg, "vmr"); +// powerpc_vsx-LABEL: vreg_f32: +// powerpc_vsx: #APP +// powerpc_vsx: vmr {{[0-9]+}}, {{[0-9]+}} +// powerpc_vsx: #NO_APP +// powerpc64_vsx-LABEL: vreg_f32: +// powerpc64_vsx: #APP +// powerpc64_vsx: vmr {{[0-9]+}}, {{[0-9]+}} +// powerpc64_vsx: #NO_APP +#[cfg(vsx)] +check!(vreg_f32, f32, vreg, "vmr"); + +// powerpc_vsx-LABEL: vreg_f64: +// powerpc_vsx: #APP +// powerpc_vsx: vmr {{[0-9]+}}, {{[0-9]+}} +// powerpc_vsx: #NO_APP +// powerpc64_vsx-LABEL: vreg_f64: +// powerpc64_vsx: #APP +// powerpc64_vsx: vmr {{[0-9]+}}, {{[0-9]+}} +// powerpc64_vsx: #NO_APP +#[cfg(vsx)] +check!(vreg_f64, f64, vreg, "vmr"); + // CHECK-LABEL: reg_i8_r0: // CHECK: #APP // CHECK: mr 0, 0 @@ -365,6 +387,28 @@ check_reg!(vreg_f32x4_v0, f32x4, "0", "v0", "vmr"); #[cfg(vsx)] check_reg!(vreg_f64x2_v0, f64x2, "0", "v0", "vmr"); +// powerpc_vsx-LABEL: vreg_f32_v0: +// powerpc_vsx: #APP +// powerpc_vsx: vmr 0, 0 +// powerpc_vsx: #NO_APP +// powerpc64_vsx-LABEL: vreg_f32_v0: +// powerpc64_vsx: #APP +// powerpc64_vsx: vmr 0, 0 +// powerpc64_vsx: #NO_APP +#[cfg(vsx)] +check_reg!(vreg_f32_v0, f32, "0", "v0", "vmr"); + +// powerpc_vsx-LABEL: vreg_f64_v0: +// powerpc_vsx: #APP +// powerpc_vsx: vmr 0, 0 +// powerpc_vsx: #NO_APP +// powerpc64_vsx-LABEL: vreg_f64_v0: +// powerpc64_vsx: #APP +// powerpc64_vsx: vmr 0, 0 +// powerpc64_vsx: #NO_APP +#[cfg(vsx)] +check_reg!(vreg_f64_v0, f64, "0", "v0", "vmr"); + // powerpc_altivec-LABEL: vreg_i8x16_v18: // powerpc_altivec: #APP // powerpc_altivec: vmr 18, 18 @@ -430,3 +474,25 @@ check_reg!(vreg_f32x4_v18, f32x4, "18", "v18", "vmr"); // powerpc64_vsx: #NO_APP #[cfg(vsx)] check_reg!(vreg_f64x2_v18, f64x2, "18", "v18", "vmr"); + +// powerpc_vsx-LABEL: vreg_f32_v18: +// powerpc_vsx: #APP +// powerpc_vsx: vmr 18, 18 +// powerpc_vsx: #NO_APP +// powerpc64_vsx-LABEL: vreg_f32_v18: +// powerpc64_vsx: #APP +// powerpc64_vsx: vmr 18, 18 +// powerpc64_vsx: #NO_APP +#[cfg(vsx)] +check_reg!(vreg_f32_v18, f32, "18", "v18", "vmr"); + +// powerpc_vsx-LABEL: vreg_f64_v18: +// powerpc_vsx: #APP +// powerpc_vsx: vmr 18, 18 +// powerpc_vsx: #NO_APP +// powerpc64_vsx-LABEL: vreg_f64_v18: +// powerpc64_vsx: #APP +// powerpc64_vsx: vmr 18, 18 +// powerpc64_vsx: #NO_APP +#[cfg(vsx)] +check_reg!(vreg_f64_v18, f64, "18", "v18", "vmr"); diff --git a/tests/ui/asm/powerpc/bad-reg.aix64.stderr b/tests/ui/asm/powerpc/bad-reg.aix64.stderr index 332bdf0ff54..036641951cc 100644 --- a/tests/ui/asm/powerpc/bad-reg.aix64.stderr +++ b/tests/ui/asm/powerpc/bad-reg.aix64.stderr @@ -170,7 +170,7 @@ error: type `i32` cannot be used with this register class LL | asm!("", in("v0") x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:79:28 @@ -178,7 +178,7 @@ error: type `i32` cannot be used with this register class LL | asm!("", out("v0") x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:87:35 @@ -186,7 +186,7 @@ error: type `i32` cannot be used with this register class LL | asm!("/* {} */", in(vreg) x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:109:27 diff --git a/tests/ui/asm/powerpc/bad-reg.powerpc64.stderr b/tests/ui/asm/powerpc/bad-reg.powerpc64.stderr index 9e0dd80b3dc..6a9d552bfe2 100644 --- a/tests/ui/asm/powerpc/bad-reg.powerpc64.stderr +++ b/tests/ui/asm/powerpc/bad-reg.powerpc64.stderr @@ -186,7 +186,7 @@ error: type `i32` cannot be used with this register class LL | asm!("", in("v0") x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:79:28 @@ -194,7 +194,7 @@ error: type `i32` cannot be used with this register class LL | asm!("", out("v0") x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: `vsx` target feature is not enabled --> $DIR/bad-reg.rs:84:35 @@ -210,7 +210,7 @@ error: type `i32` cannot be used with this register class LL | asm!("/* {} */", in(vreg) x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:109:27 diff --git a/tests/ui/asm/powerpc/bad-reg.powerpc64le.stderr b/tests/ui/asm/powerpc/bad-reg.powerpc64le.stderr index 332bdf0ff54..036641951cc 100644 --- a/tests/ui/asm/powerpc/bad-reg.powerpc64le.stderr +++ b/tests/ui/asm/powerpc/bad-reg.powerpc64le.stderr @@ -170,7 +170,7 @@ error: type `i32` cannot be used with this register class LL | asm!("", in("v0") x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:79:28 @@ -178,7 +178,7 @@ error: type `i32` cannot be used with this register class LL | asm!("", out("v0") x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:87:35 @@ -186,7 +186,7 @@ error: type `i32` cannot be used with this register class LL | asm!("/* {} */", in(vreg) x); // FIXME: should be ok if vsx is available | ^ | - = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, i64x2, f64x2 + = note: register class `vreg` supports these types: i8x16, i16x8, i32x4, f32x4, f32, f64, i64x2, f64x2 error: type `i32` cannot be used with this register class --> $DIR/bad-reg.rs:109:27 |
