[PATCH] D96351: [PowerPC][AIX] Enable the default AltiVec ABI on AIX
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 14:58:36 PST 2021
sfertile added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:446
case PPC::VFRCRegClassID:
- case PPC::VSLRCRegClassID:
+ case PPC::VSLRCRegClassID: {
+ const PPCSubtarget &Subtarget = MF.getSubtarget<PPCSubtarget>();
----------------
With this change we will need to split up these cases.
The pre VSX register sets are the easiest to explain:
`F8RC` --> This is the F0-F31, which represents the 32 fprs with type f64.
`F4RC` --> This is the same as F8RC but with type f32.
These register sets won't change in the default ABI and will still have 32 available registers.
`VRRC` --> This is V0-V31 and represents the vector registers. With the extended ABI we can access all of them, with the default ABI we have the limited set of the first 20.
Once we add VSX it gets complicated: the other register sets are how we represent the registers with VSX. VSX has 64 128-bit wide registers. The fprs are mapped into element 0 of the first 32 VSX registers (VSR0-VSR31), with the vrs are mapped into the the second set of 32 VSX registers (VSR32-VSR64).
`VFRC` --> This is the set of 32 64-bit floating point sub registers not overlapped by the fprs (vsr32-vsr64). Used in instructions like lxsd/stxsd where we encode a register number N between 0-31 in the instruction but the instruction targets the sub register 32 + N.
`VSLRC` --> The 32 128-bit registers that the fprs overlap (vs0-vsr31).
`VSRC` --> `VSLRC U VR` vsr0-vsr31 + vsr31-vsr63 = vsr0-vsr63, or all the vsx vector registers.
`VSFRC` --> `VFRC U F8RC` all the 64-bit sub registers of the vsx vector registers.
`VSSRC` --> Same as VSFRC but the with type f32.
The qvecnvol option doesn't mention vsx registers but I would assume any that overlap the VRs are affected the same way, and the scalar registers which overlap vsr0-vsr31 are unaffectedly by the option. I'm not sure if there is any restriction on the vector registers vsr0-vsr31 in the default ABI.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96351/new/
https://reviews.llvm.org/D96351
More information about the llvm-commits
mailing list