================ @@ -3124,6 +3125,36 @@ bool PPCInstrInfo::expandPostRAPseudo(MachineInstr &MI) const { .addReg(Reg); return true; } + case PPC::PPCLdFixedAddr: { + assert(Subtarget.isTargetLinux() && + "Only Linux target is expected to contain PPCLdFixedAddr"); + int64_t Offset = 0; + const unsigned Reg = Subtarget.isPPC64() ? PPC::X13 : PPC::R2; + MI.setDesc(get(PPC::LWZ)); + uint64_t FAType = MI.getOperand(1).getImm(); +#undef PPC_FEATURE +#undef PPC_CPU +#include "llvm/TargetParser/PPCTargetParser.def" + // The HWCAP and HWCAP2 word offsets are reversed on big endian Linux. + if ((FAType == PPC_FAWORD_HWCAP && Subtarget.isLittleEndian()) || + (FAType == PPC_FAWORD_HWCAP2 && !Subtarget.isLittleEndian())) + Offset = Subtarget.isPPC64() ? -0x7064 : -0x703C; ---------------- nemanjai wrote:
That is a good point. These aren't externally documented- by Glibc, but they should be documented here in the code. https://github.com/llvm/llvm-project/pull/68919 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits