| @@ -1,11 +1,16 @@ |
|
|
| 1 |
1 |
//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 |
|
2 |
+// 32-bit x86 returns `f32` and `f64` differently to avoid the x87 stack. |
|
3 |
+//@ revisions: x86 other |
|
4 |
+//@[x86] only-x86 |
|
5 |
+//@[other] ignore-x86 |
| 2 |
6 |
|
| 3 |
7 |
#![crate_type = "lib"] |
| 4 |
8 |
|
| 5 |
9 |
#[no_mangle] |
| 6 |
10 |
pub struct F32(f32); |
| 7 |
11 |
|
| 8 |
|
-// CHECK: define{{.*}}float @add_newtype_f32(float %a, float %b) |
|
12 |
+// other: define{{.*}}float @add_newtype_f32(float %a, float %b) |
|
13 |
+// x86: define{{.*}}i32 @add_newtype_f32(float %a, float %b) |
| 9 |
14 |
#[inline(never)] |
| 10 |
15 |
#[no_mangle] |
| 11 |
16 |
pub fn add_newtype_f32(a: F32, b: F32) -> F32 { |
| @@ -15,7 +20,8 @@ pub fn add_newtype_f32(a: F32, b: F32) -> F32 { |
|
|
| 15 |
20 |
#[no_mangle] |
| 16 |
21 |
pub struct F64(f64); |
| 17 |
22 |
|
| 18 |
|
-// CHECK: define{{.*}}double @add_newtype_f64(double %a, double %b) |
|
23 |
+// other: define{{.*}}double @add_newtype_f64(double %a, double %b) |
|
24 |
+// x86: define{{.*}}void @add_newtype_f64(ptr{{.*}}sret([8 x i8]){{.*}}%_0, double %a, double %b) |
| 19 |
25 |
#[inline(never)] |
| 20 |
26 |
#[no_mangle] |
| 21 |
27 |
pub fn add_newtype_f64(a: F64, b: F64) -> F64 { |