[llvm] [Mips] Introduce ABI-specific register names and accessors (PR #224284)

Ying Huang via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 01:43:30 PDT 2026


================
@@ -2706,8 +2705,8 @@ SDValue MipsTargetLowering::lowerEH_RETURN(SDValue Op, SelectionDAG &DAG)
 
   // Store stack offset in V1, store jump target in V0. Glue CopyToReg and
   // EH_RETURN nodes, so that instructions are emitted back-to-back.
-  unsigned OffsetReg = ABI.IsN64() ? Mips::V1_64 : Mips::V1;
-  unsigned AddrReg = ABI.IsN64() ? Mips::V0_64 : Mips::V0;
+  unsigned OffsetReg = ABI.getReturnReg(1, ABI.ArePtrs64bit());
+  unsigned AddrReg = ABI.getReturnReg(0, ABI.ArePtrs64bit());
----------------
yingopq wrote:

Could we add a usage recommendation where the function is declared? That way, others will take note of it when using it.

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


More information about the llvm-commits mailing list