Skip to content

Commit c79f156

Browse files
committed
tests: account for CFI directives in tests/assembly/x86-return-float.rs
1 parent e3296cd commit c79f156

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/assembly/x86-return-float.rs

+10
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use minicore::*;
3535
pub fn return_f32(x: f32) -> f32 {
3636
// CHECK: movss {{.*}}(%ebp), %xmm0
3737
// CHECK-NEXT: popl %ebp
38+
// linux-NEXT: .cfi_def_cfa
3839
// CHECK-NEXT: retl
3940
x
4041
}
@@ -44,6 +45,7 @@ pub fn return_f32(x: f32) -> f32 {
4445
pub fn return_f64(x: f64) -> f64 {
4546
// CHECK: movsd {{.*}}(%ebp), %xmm0
4647
// CHECK-NEXT: popl %ebp
48+
// linux-NEXT: .cfi_def_cfa
4749
// CHECK-NEXT: retl
4850
x
4951
}
@@ -313,9 +315,13 @@ pub unsafe fn call_other_f64(x: &mut (usize, f64)) {
313315
#[no_mangle]
314316
pub fn return_f16(x: f16) -> f16 {
315317
// CHECK: pushl %ebp
318+
// linux-NEXT: .cfi_def_cfa_offset
319+
// linux-NEXT: .cfi_offset
316320
// CHECK-NEXT: movl %esp, %ebp
321+
// linux-NEXT: .cfi_def_cfa_register
317322
// CHECK-NEXT: pinsrw $0, 8(%ebp), %xmm0
318323
// CHECK-NEXT: popl %ebp
324+
// linux-NEXT: .cfi_def_cfa
319325
// CHECK-NEXT: retl
320326
x
321327
}
@@ -324,10 +330,14 @@ pub fn return_f16(x: f16) -> f16 {
324330
#[no_mangle]
325331
pub fn return_f128(x: f128) -> f128 {
326332
// CHECK: pushl %ebp
333+
// linux-NEXT: .cfi_def_cfa_offset
334+
// linux-NEXT: .cfi_offset
327335
// CHECK-NEXT: movl %esp, %ebp
336+
// linux-NEXT: .cfi_def_cfa_register
328337
// linux-NEXT: movaps 8(%ebp), %xmm0
329338
// win-NEXT: movups 8(%ebp), %xmm0
330339
// CHECK-NEXT: popl %ebp
340+
// linux-NEXT: .cfi_def_cfa
331341
// CHECK-NEXT: retl
332342
x
333343
}

0 commit comments

Comments
 (0)