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
;
36 struct long_struct ls
;
42 check_union_passing1(union un1 u ATTRIBUTE_UNUSED
)
48 check_union_passing2(union un2 u ATTRIBUTE_UNUSED
)
54 check_union_passing3(union un3 u ATTRIBUTE_UNUSED
)
59 #define check_union_passing1 WRAP_CALL(check_union_passing1)
60 #define check_union_passing2 WRAP_CALL(check_union_passing2)
61 #define check_union_passing3 WRAP_CALL(check_union_passing3)
67 #ifdef CHECK_LARGER_UNION_PASSING
71 struct long_struct ls
;
72 #endif /* CHECK_LARGER_UNION_PASSING */
74 /* Check a union with char, int. */
75 clear_struct_registers
;
76 u1
.i
= 0; /* clear the struct to not have high bits left */
80 clear_int_hardware_registers
;
81 check_union_passing1(u1
);
82 u1
.i
= 0; /* clear the struct to not have high bits left */
86 clear_int_hardware_registers
;
87 check_union_passing1(u1
);
89 /* Check a union with char, long, char. */
90 #ifdef CHECK_LARGER_UNION_PASSING
91 clear_struct_registers
;
92 u2
.l
= 0; /* clear the struct to not have high bits left */
96 clear_int_hardware_registers
;
97 check_union_passing2(u2
);
98 u2
.l
= 0; /* clear the struct to not have high bits left */
102 clear_int_hardware_registers
;
103 check_union_passing2(u2
);
104 u2
.l
= 0; /* clear the struct to not have high bits left */
108 clear_int_hardware_registers
;
109 check_union_passing2(u2
);
111 /* check a union containing two structs and a union. */
112 clear_struct_registers
;
114 u3
.ls
.l
= 0; /* clear the struct to not have high bits left */
118 clear_int_hardware_registers
;
119 check_union_passing3(u3
);
121 u3
.ls
.l
= 0; /* clear the struct to not have high bits left */
125 clear_int_hardware_registers
;
126 check_union_passing3(u3
);
128 u3
.ls
.l
= 0; /* clear the struct to not have high bits left */
132 clear_int_hardware_registers
;
133 check_union_passing3(u3
);
135 u3
.ls
.l
= 0; /* clear the struct to not have high bits left */
139 clear_int_hardware_registers
;
140 check_union_passing3(u3
);
141 #endif /* CHECK_LARGER_UNION_PASSING */