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)]
26 // NB: due to delay slots the `ld` following the call is actually executed before the call.
28 pub unsafe extern "C" fn callee(arg: Franta) {
29 // CHECK-LABEL: callee:
30 // CHECK: st %f3, [[PLACE_D:.*]]
31 // CHECK: st %f2, [[PLACE_C:.*]]
32 // CHECK: st %f1, [[PLACE_B:.*]]
33 // CHECK: st %f0, [[PLACE_A:.*]]
34 // CHECK: call tst_use
35 // CHECK-NEXT: ld [[PLACE_A]], %f1
36 // CHECK: call tst_use
37 // CHECK-NEXT: ld [[PLACE_B]], %f1
38 // CHECK: call tst_use
39 // CHECK-NEXT: ld [[PLACE_C]], %f1
40 // CHECK: call tst_use
41 // CHECK-NEXT: ld [[PLACE_D]], %f1
50 fn opaque_callee(arg: Franta, intarg: i32);
56 pub unsafe extern "C" fn caller() {
57 // CHECK-LABEL: caller:
58 // CHECK: ld [{{.*}}], %f0
59 // CHECK: ld [{{.*}}], %f1
60 // CHECK: ld [{{.*}}], %f2
61 // CHECK: ld [{{.*}}], %f3
62 // CHECK: call opaque_callee
64 opaque_callee(Franta { a: 1.0, b: 2.0, c: 3.0, d: 4.0 }, 3);