about summary refs log tree commit diff
path: root/tests/codegen/issues
diff options
context:
space:
mode:
authorbeetrees <b@beetr.ee>2024-07-03 13:41:36 +0100
committerbeetrees <b@beetr.ee>2024-07-12 10:47:56 +0100
commitcae9d480bfe930a678fe2744082fc6ef1d957f63 (patch)
tree304ebae7b243216bc560341ace28b9ca864f8a62 /tests/codegen/issues
parent0f643c449aea5060de03a0b8fe8288cd1c861e0d (diff)
downloadrust-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.rs10
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 {