On 18/05/2020 04:20, duanbo (C) wrote: > Hi, > > This changes the definition of Pmode for aarch64 port. > Unlike x86, S390 etc., Pmode is always set to DImode for aarch64 port even > under ILP32. > Because of that definition, machine mode of symbol_ref which is supposed to > be SImode becomes DImode under target ILP32. > Definition of Pmode should depend on the current ABI, i.e., SImode for ILP32 > and DImode for LP64. > Attached please find the proposed patch . > Bootstrap and tested on aarch64 Linux platform. No new regression witnessed. > Any suggestion? > > Thanks, > Duanbo >
I don't think this is right. In aarch64 addresses are ALWAYS 64 bits, even in ILP32. Language level pointers can be 32-bit but addresses on the bus must always be 64-bit. As Andrew points out, without this distinction things will fail to work properly. Where is the testcase for the problem you are trying to solve? Your patch lacks tests... R.