diff options
| author | beetrees <b@beetr.ee> | 2024-07-03 13:41:36 +0100 |
|---|---|---|
| committer | beetrees <b@beetr.ee> | 2024-07-12 10:47:56 +0100 |
| commit | cae9d480bfe930a678fe2744082fc6ef1d957f63 (patch) | |
| tree | 304ebae7b243216bc560341ace28b9ca864f8a62 /tests/codegen/issues | |
| parent | 0f643c449aea5060de03a0b8fe8288cd1c861e0d (diff) | |
| download | rust-cae9d480bfe930a678fe2744082fc6ef1d957f63.tar.gz rust-cae9d480bfe930a678fe2744082fc6ef1d957f63.zip | |
Adjust tests for x86 "Rust" ABI changes
Diffstat (limited to 'tests/codegen/issues')
| -rw-r--r-- | tests/codegen/issues/issue-32031.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/codegen/issues/issue-32031.rs b/tests/codegen/issues/issue-32031.rs index 9693c414a67..4d6895166f1 100644 --- a/tests/codegen/issues/issue-32031.rs +++ b/tests/codegen/issues/issue-32031.rs @@ -1,11 +1,16 @@ //@ compile-flags: -C no-prepopulate-passes -Copt-level=0 +// 32-bit x86 returns `f32` and `f64` differently to avoid the x87 stack. +//@ revisions: x86 other +//@[x86] only-x86 +//@[other] ignore-x86 #![crate_type = "lib"] #[no_mangle] pub struct F32(f32); -// CHECK: define{{.*}}float @add_newtype_f32(float %a, float %b) +// other: define{{.*}}float @add_newtype_f32(float %a, float %b) +// x86: define{{.*}}i32 @add_newtype_f32(float %a, float %b) #[inline(never)] #[no_mangle] pub fn add_newtype_f32(a: F32, b: F32) -> F32 { @@ -15,7 +20,8 @@ pub fn add_newtype_f32(a: F32, b: F32) -> F32 { #[no_mangle] pub struct F64(f64); -// CHECK: define{{.*}}double @add_newtype_f64(double %a, double %b) +// other: define{{.*}}double @add_newtype_f64(double %a, double %b) +// x86: define{{.*}}void @add_newtype_f64(ptr{{.*}}sret([8 x i8]){{.*}}%_0, double %a, double %b) #[inline(never)] #[no_mangle] pub fn add_newtype_f64(a: F64, b: F64) -> F64 { |
