Message ID | CAGWvnymkas4bKa4p8irju4bb7p-87J3B8axZF-wigxoDMEvvXA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 10/08/2015 05:35 AM, David Edelsohn wrote: > The recent patches to move GCC exception handling tables on AIX to > read-only data changed the EH data format from absolute pointers to > data-relative or pc-relative, but the offset was encoded as 32 bit, > which isn't robust in 64-bit mode. This patch adjusts the definition > to selects the encoding based on 32 bit versus 64 bit mode. > > I would appreciate any additional eyes on the new design to check if > Andrew and I missed anything. > > Bootstrapped on powerpc-ibm-aix7.1.0.0 and tested with g++.dg/eh > > Thanks, David > > * config/rs6000/xcoff.h (ASM_PREFERRED_EH_DATA_FORMAT): Use 64-bit > encoding in 64-bit mode. The rs6000 port doesn't have any kind of "code model" to select the size of the application here? I guess considering the way the aix calling convention uses its TOC slices you wouldn't have needed one yet. Perhaps eating the extra space is the most robust. r~
Index: xcoff.h =================================================================== --- xcoff.h (revision 228568) +++ xcoff.h (working copy) @@ -307,8 +307,8 @@ so use addressing relative to the data segment. */ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ - ((GLOBAL) ? (DW_EH_PE_indirect | DW_EH_PE_datarel | DW_EH_PE_sdata4) \ - : (DW_EH_PE_pcrel | DW_EH_PE_sdata4)) + (((GLOBAL) ? DW_EH_PE_indirect | DW_EH_PE_datarel : DW_EH_PE_pcrel) \ + | (TARGET_64BIT ? DW_EH_PE_sdata8 : DW_EH_PE_sdata4)) #define EH_FRAME_THROUGH_COLLECT2 1 #define EH_TABLES_CAN_BE_READ_ONLY 1