[llvm] [RISC-V][HWASAN] Fix incorrect comments (PR #103728)
Samuel Holland via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 02:24:47 PDT 2024
https://github.com/SiFiveHolland created https://github.com/llvm/llvm-project/pull/103728
These comments were confusing because they do not match the code.
>From 301ba4f59b3c52e08f9a9ef1273659b382a793d5 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel.holland at sifive.com>
Date: Fri, 2 Aug 2024 16:36:42 -0700
Subject: [PATCH] [RISC-V][HWASAN] Fix incorrect comments
---
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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)
More information about the llvm-commits
mailing list