mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
* printcmd.c, config/pa/xm-pa.h, config/alpha/xm-alpha.h: Make it so
arg_bytes field of makeva_list is always aligned. * config/pa/xm-pa.h: Make arglist_address a char *.
This commit is contained in:
@ -43,7 +43,7 @@ extern void free PARAMS ((void *));
|
|||||||
#define MAKEVA_END(list) \
|
#define MAKEVA_END(list) \
|
||||||
{ \
|
{ \
|
||||||
va_list ret; \
|
va_list ret; \
|
||||||
ret.a0 = (char *)(list)->arg_bytes; \
|
ret.a0 = (char *)(list)->aligner.arg_bytes; \
|
||||||
ret.offset = (list)->argindex; \
|
ret.offset = (list)->argindex; \
|
||||||
return ret; \
|
return ret; \
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
/* Definitions for all PA machines. */
|
/* Definitions for all PA machines. */
|
||||||
|
|
||||||
#define MAKEVA_EXTRA_INFO int arglist_address;
|
|
||||||
|
|
||||||
#define MAKEVA_START(list) \
|
#define MAKEVA_START(list) \
|
||||||
list->argindex = list->nargs * list->max_arg_size; \
|
list->argindex = list->nargs * list->max_arg_size;
|
||||||
list->arglist_address = 0;
|
|
||||||
|
|
||||||
#define MAKEVA_ARG(list, argaddr, argsize) \
|
#define MAKEVA_ARG(list, argaddr, argsize) \
|
||||||
{ \
|
{ \
|
||||||
@ -18,17 +15,13 @@
|
|||||||
else if (argsize <= 8) \
|
else if (argsize <= 8) \
|
||||||
rounded_argsize = 8; \
|
rounded_argsize = 8; \
|
||||||
list->argindex -= rounded_argsize; \
|
list->argindex -= rounded_argsize; \
|
||||||
while ((int)(&list->arg_bytes[list->argindex]) % rounded_argsize) \
|
while ((int)(&list->aligner.arg_bytes[list->argindex]) % rounded_argsize) \
|
||||||
list->argindex--; \
|
list->argindex--; \
|
||||||
/* arglist_address is used to store the address of the first arguent. */ \
|
memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
|
||||||
if (list->arglist_address == 0) \
|
|
||||||
list->arglist_address = &list->arg_bytes[list->argindex] \
|
|
||||||
+ rounded_argsize; \
|
|
||||||
memcpy (&list->arg_bytes[list->argindex], argaddr, argsize); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The address of the arglist is the address right after the args
|
/* The address of the arglist is the address right after the args
|
||||||
(which is what you'd expect). This address is stored in the arglist_address
|
(which is what you'd expect). */
|
||||||
field. */
|
|
||||||
#define MAKEVA_END(list) \
|
#define MAKEVA_END(list) \
|
||||||
return (va_list) list->arglist_address;
|
return (va_list) (list->aligner.arg_bytes \
|
||||||
|
+ list->nargs * list->max_arg_size)
|
||||||
|
Reference in New Issue
Block a user