1 /* This tests passing of structs. Only integers are tested. */
6 struct IntegerRegisters iregs
;
7 struct FloatRegisters fregs
;
8 unsigned int num_iregs
, num_fregs
;
46 struct long_struct ls
;
52 check_mixed_passing1 (char c1 ATTRIBUTE_UNUSED
, struct int_struct is ATTRIBUTE_UNUSED
, char c2 ATTRIBUTE_UNUSED
)
58 check_mixed_passing2 (char c1 ATTRIBUTE_UNUSED
, struct long3_struct ls ATTRIBUTE_UNUSED
, char c2 ATTRIBUTE_UNUSED
)
62 /* Check the passing on the stack by comparing the address of the
63 stack elements to the expected place on the stack. */
64 assert ((unsigned long)&ls
.l1
== rsp
+8);
65 assert ((unsigned long)&ls
.l2
== rsp
+16);
66 assert ((unsigned long)&ls
.l3
== rsp
+24);
72 struct int_struct is
= { 64 };
73 #ifdef CHECK_LARGER_STRUCTS
74 struct long3_struct l3s
= { 65, 66, 67 };
77 clear_struct_registers
;
82 clear_int_hardware_registers
;
83 WRAP_CALL (check_mixed_passing1
)(8, is
, 9);
85 #ifdef CHECK_LARGER_STRUCTS
86 clear_struct_registers
;
90 clear_int_hardware_registers
;
91 WRAP_CALL (check_mixed_passing2
)(10, l3s
, 11);