2 // - float structure members are passes in floating point registers
5 // assembly-output: emit-asm
6 // needs-llvm-components: sparc
7 // compile-flags: --target=sparcv9-sun-solaris -Copt-level=3
9 #![feature(no_core, lang_items)]
25 // NB: due to delay slots the `ld` following the call is actually executed before the call.
27 pub unsafe extern "C" fn callee(arg: Franta) {
28 // CHECK-LABEL: callee:
29 // CHECK: st %f3, [[PLACE_D:.*]]
30 // CHECK: st %f2, [[PLACE_C:.*]]
31 // CHECK: st %f1, [[PLACE_B:.*]]
32 // CHECK: st %f0, [[PLACE_A:.*]]
33 // CHECK: call tst_use
34 // CHECK-NEXT: ld [[PLACE_A]], %f1
35 // CHECK: call tst_use
36 // CHECK-NEXT: ld [[PLACE_B]], %f1
37 // CHECK: call tst_use
38 // CHECK-NEXT: ld [[PLACE_C]], %f1
39 // CHECK: call tst_use
40 // CHECK-NEXT: ld [[PLACE_D]], %f1
49 fn opaque_callee(arg: Franta, intarg: i32);
55 pub unsafe extern "C" fn caller() {
56 // CHECK-LABEL: caller:
57 // CHECK: ld [{{.*}}], %f0
58 // CHECK: ld [{{.*}}], %f1
59 // CHECK: ld [{{.*}}], %f2
60 // CHECK: ld [{{.*}}], %f3
61 // CHECK: call opaque_callee
63 opaque_callee(Franta { a: 1.0, b: 2.0, c: 3.0, d: 4.0 }, 3);