[llvm] [RISCV] Add 16 bit GPR sub-register for Zhinx. (PR #107446)

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 06:46:56 PDT 2024


================
@@ -139,6 +139,23 @@ ArrayRef<MCPhysReg> RISCV::getArgGPRs(const RISCVABI::ABI ABI) {
   return ArrayRef(ArgIGPRs);
 }
 
+static ArrayRef<MCPhysReg> getArgGPR16s(const RISCVABI::ABI ABI) {
+  // The GPRs used for passing arguments in the ILP32* and LP64* ABIs, except
+  // the ILP32E ABI.
+  static const MCPhysReg ArgIGPRs[] = {RISCV::X10_H, RISCV::X11_H, RISCV::X12_H,
+                                       RISCV::X13_H, RISCV::X14_H, RISCV::X15_H,
+                                       RISCV::X16_H, RISCV::X17_H};
+  // The GPRs used for passing arguments in the ILP32E/ILP64E ABI.
----------------
asb wrote:

Typo: ILP64E => LP64E (I've just committed a fix to other similar instances in this file).

https://github.com/llvm/llvm-project/pull/107446


More information about the llvm-commits mailing list