This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA] Register prefix changes for VAX ELF


> > ! #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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]