[llvm] [RISCV] Add CFI information for vector callee-saved registers (PR #86811)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 21:14:22 PDT 2024
================
@@ -452,29 +478,39 @@ static MCCFIInstruction createDefCFAExpression(const TargetRegisterInfo &TRI,
else
Comment << printReg(Reg, &TRI);
- uint8_t buffer[16];
- if (FixedOffset) {
- Expr.push_back(dwarf::DW_OP_consts);
- Expr.append(buffer, buffer + encodeSLEB128(FixedOffset, buffer));
- Expr.push_back((uint8_t)dwarf::DW_OP_plus);
- Comment << " + " << FixedOffset;
- }
+ appendScalableVectorExpression(Expr, FixedOffset, ScalableOffset,
+ TRI.getDwarfRegNum(RISCV::VLENB, true),
----------------
topperc wrote:
Why is the caller responsible for calling `TRI.getDwarfRegNum(RISCV::VLENB, true)`? Can we sink that into the function?
https://github.com/llvm/llvm-project/pull/86811
More information about the llvm-commits
mailing list