This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFA] Register prefix changes for VAX ELF
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Cc: rth at redhat dot com, thorpej at wasabisystems dot com
- Date: Sat, 22 Jun 2002 16:53:12 -0400 (EDT)
- Subject: 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)