[llvm] [RISC-V][HWASAN] Fix incorrect comments (PR #103728)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 02:25:38 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v
Author: Samuel Holland (SiFiveHolland)
<details>
<summary>Changes</summary>
These comments were confusing because they do not match the code.
---
Full diff: https://github.com/llvm/llvm-project/pull/103728.diff
1 Files Affected:
- (modified) llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp (+2-2)
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
index 93677433c04405..bf4abcfd8b9d98 100644
--- a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+++ b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
@@ -672,12 +672,12 @@ void RISCVAsmPrinter::EmitHwasanMemaccessSymbols(Module &M) {
OutStreamer->emitInstruction(
MCInstBuilder(RISCV::LBU).addReg(RISCV::X6).addReg(RISCV::X6).addImm(0),
MCSTI);
- // Extract tag from X5 and compare it with loaded tag from shadow
+ // Extract tag from pointer and compare it with loaded tag from shadow
OutStreamer->emitInstruction(
MCInstBuilder(RISCV::SRLI).addReg(RISCV::X7).addReg(Reg).addImm(56),
MCSTI);
MCSymbol *HandleMismatchOrPartialSym = OutContext.createTempSymbol();
- // X7 contains tag from memory, while X6 contains tag from the pointer
+ // X7 contains tag from the pointer, while X6 contains tag from memory
OutStreamer->emitInstruction(
MCInstBuilder(RISCV::BNE)
.addReg(RISCV::X7)
``````````
</details>
https://github.com/llvm/llvm-project/pull/103728
More information about the llvm-commits
mailing list