[PATCH/RFA] Register prefix changes for VAX ELF

John David Anglin dave@hiauly1.hia.nrc.ca
Sat Jun 22 14:07:00 GMT 2002


> > ! #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION)    \
> > ! do {                                                                \
> > !   fprintf (FILE, "\t.word 0x0ffc\n");                               \
> > !   fprintf (FILE, "\taddl2 $%d,4(%sap)\n", DELTA, REGISTER_PREFIX);  \
> > !   fprintf (FILE, "\tjmp ");                                         \
> > !   assemble_name (FILE,  XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0));   \
> > !   fprintf (FILE, "+2\n");                                           \
> 
> Incidentally, this will break the EH unwinding we've been talking
> about, since the saveregmask on the stack won't match the frame info
> in the real function.
> 
> What's really needed is to either
> 
>   (1) know what the saveregmask for FUNCTION should be (because we've
>       just compiled it) or

This can be done relatively simply by implementing ASM_OUTPUT_MI_THUNK
as a function in vax.c.  The mask calculated by vax_output_function_prologue
can be accessed by vax_asm_output_mi_thunk by putting the value in a
machine extension to the per function struct, or possibly more simply
in a static location if we are guaranteed that the thunk immediately
follows FUNCTION.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Gcc-patches mailing list