[llvm] [RISCV] Implement trampolines for rv64 (PR #96309)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 00:52:25 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 79a0b665934a3de1113d1df90a9d677f39d9389a ebaf74f98b59a1be4800d1b7d5569e78308264ac --extensions cpp,h -- llvm/lib/Target/RISCV/RISCVISelLowering.cpp llvm/lib/Target/RISCV/RISCVISelLowering.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index afb69c8aef..90def203c9 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -7297,7 +7297,7 @@ SDValue RISCVTargetLowering::lowerINIT_TRAMPOLINE(SDValue Op,
// Create an MCCodeEmitter to encode instructions.
TargetLoweringObjectFile *TLO = getTargetMachine().getObjFileLowering();
assert(TLO);
- MCContext& MCCtx = TLO->getContext();
+ MCContext &MCCtx = TLO->getContext();
std::unique_ptr<MCCodeEmitter> CodeEmitter(
createRISCVMCCodeEmitter(*getTargetMachine().getMCInstrInfo(), MCCtx));
@@ -7356,8 +7356,7 @@ SDValue RISCVTargetLowering::lowerINIT_TRAMPOLINE(SDValue Op,
Addr = DAG.getNode(ISD::ADD, dl, MVT::i64, Trmp,
DAG.getConstant(4, dl, MVT::i64));
OutChains[1] = DAG.getTruncStore(
- Root, dl,
- DAG.getConstant(LD_X5_TargetFunctionOffset, dl, MVT::i64), Addr,
+ Root, dl, DAG.getConstant(LD_X5_TargetFunctionOffset, dl, MVT::i64), Addr,
MachinePointerInfo(TrmpAddr, 4), MVT::i32);
// ld t2, 16(t2)
@@ -7368,8 +7367,8 @@ SDValue RISCVTargetLowering::lowerINIT_TRAMPOLINE(SDValue Op,
Addr = DAG.getNode(ISD::ADD, dl, MVT::i64, Trmp,
DAG.getConstant(8, dl, MVT::i64));
OutChains[2] = DAG.getTruncStore(
- Root, dl, DAG.getConstant(LD_X7_StaticChainOffset, dl, MVT::i64),
- Addr, MachinePointerInfo(TrmpAddr, 8), MVT::i32);
+ Root, dl, DAG.getConstant(LD_X7_StaticChainOffset, dl, MVT::i64), Addr,
+ MachinePointerInfo(TrmpAddr, 8), MVT::i32);
// jalr t0
// Jump to the function.
``````````
</details>
https://github.com/llvm/llvm-project/pull/96309
More information about the llvm-commits
mailing list