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/RFC] SH64 EH with pic (2/4)


Joern Rennecke <joern.rennecke@superh.com> wrote:
>>  #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
>>    do { \
>> -    if (((ENCODING) & 0x70) == DW_EH_PE_textrel) \
>> +    if (((ENCODING) & 0xf) != DW_EH_PE_sdata4 \
>> +	&& ((ENCODING) & 0xf) != DW_EH_PE_sdata8) \
>>        { \
>> -	encoding &= ~DW_EH_PE_textrel; \
>> -	encoding |= flag_pic ? DW_EH_PE_pcrel : DW_EH_PE_absptr; \
>>  	if (GET_CODE (ADDR) != SYMBOL_REF) \
>>  	  abort (); \
>>  	SYMBOL_REF_FLAGS (ADDR) |= SYMBOL_FLAG_FUNCTION; \
> 
> Don't you need an else clause to translate sdata4/8 into absptr/pcrel?
> sdata and absptr might make little difference, but I'd think that pcrel
> for pic is important.

I also change ASM_PREFERRED_EH_DATA_FORMAT to

#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
 ((flag_pic && (GLOBAL) ? DW_EH_PE_indirect : 0) \
  | (flag_pic ? DW_EH_PE_pcrel : DW_EH_PE_absptr) \
  | ((CODE) ? 0 : (TARGET_SHMEDIA64 ? DW_EH_PE_sdata8 : DW_EH_PE_sdata4)))

and there is no overlapping bit between DW_EH_PE_pcrel (0x10)
and DW_EH_PE_sdataN (< 0xf).  So I thought there is no problem.

Regards,
	kaz


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