1 /* This tests passing of structs. Only integers are tested. */
6 struct IntegerRegisters iregbits
= { ~0, ~0, ~0, ~0, ~0, ~0 };
7 struct IntegerRegisters iregs
;
8 unsigned int num_iregs
;
15 struct longlong_struct
46 struct longlong_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
== esp
+4);
65 assert ((unsigned long)&ls
.l2
== esp
+8);
66 assert ((unsigned long)&ls
.l3
== esp
+12);
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
;
92 clear_int_hardware_registers
;
93 WRAP_CALL (check_mixed_passing2
)(10, l3s
, 11);