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: [CFT] re-organize var-tracking frame_base


> +/* This macro chooses the encoding of pointers embedded in the exception
> +   handling sections.  If at all possible, this should be defined such
> +   that the exception handling section will not require dynamic relocations,
> +   and so may be read-only.
> +
> +   FIXME: We use DW_EH_PE_aligned to output a PLABEL constructor for
> +   global function pointers.  */
> +#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)			\
> +  (CODE == 2 && GLOBAL ? DW_EH_PE_aligned : DW_EH_PE_absptr)
> +
> +/* Handle special EH pointer encodings.  Absolute, pc-relative, and
> +   indirect are handled automatically.  Since pc-relative encoding is
> +   not possible on the PA and we don't have the infrastructure for
> +   data relative encoding, we use aligned plabels for global function
> +   pointers.  */
> +#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
> +  do {									\
> +    if (((ENCODING) & 0x0F) == DW_EH_PE_aligned)			\
> +      {									\
> +	fputs (integer_asm_op (SIZE, FALSE), FILE);			\
> +	fputs ("P%", FILE);						\
> +	assemble_name (FILE, XSTR (ADDR, 0));				\
> +	goto DONE;							\
> +      }									\
> +    } while (0)

I've come to realize that this technique won't work in the 64-bit
runtime because function descriptors have a different layout than
the 32-bit runtime.  Possibly, pc-relative can be used but I'm not
sure.  I added some assembler support for this a couple of years ago.

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


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