1993-06-29 06:35:18 +08:00
|
|
|
/* Definitions for all PA machines. */
|
|
|
|
|
|
|
|
#define MAKEVA_START(list) \
|
1993-07-20 07:31:09 +08:00
|
|
|
list->argindex = list->nargs * list->max_arg_size;
|
1993-06-29 06:35:18 +08:00
|
|
|
|
|
|
|
#define MAKEVA_ARG(list, argaddr, argsize) \
|
1993-07-15 06:44:03 +08:00
|
|
|
{ \
|
|
|
|
int rounded_argsize; \
|
|
|
|
if (argsize > 8) \
|
|
|
|
/* Currently this never happens; printf_command only uses argsize */ \
|
|
|
|
/* of sizeof (int), sizeof (double), or sizeof (long long). */ \
|
|
|
|
error ("MAKEVA_ARG not fully written for hp-pa"); \
|
|
|
|
if (argsize <= 4) \
|
|
|
|
rounded_argsize = 4; \
|
|
|
|
else if (argsize <= 8) \
|
|
|
|
rounded_argsize = 8; \
|
|
|
|
list->argindex -= rounded_argsize; \
|
1993-07-20 07:31:09 +08:00
|
|
|
while ((int)(&list->aligner.arg_bytes[list->argindex]) % rounded_argsize) \
|
1993-07-15 06:44:03 +08:00
|
|
|
list->argindex--; \
|
1993-07-20 07:31:09 +08:00
|
|
|
memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
|
1993-07-15 06:44:03 +08:00
|
|
|
}
|
1993-06-29 06:35:18 +08:00
|
|
|
|
1993-06-30 02:53:40 +08:00
|
|
|
/* The address of the arglist is the address right after the args
|
1993-07-20 07:31:09 +08:00
|
|
|
(which is what you'd expect). */
|
1993-06-29 06:35:18 +08:00
|
|
|
#define MAKEVA_END(list) \
|
1993-07-20 07:31:09 +08:00
|
|
|
return (va_list) (list->aligner.arg_bytes \
|
|
|
|
+ list->nargs * list->max_arg_size)
|