Skip to content

Commit 1a19313

Browse files
[RISC-V][HWASAN] Fix incorrect comments (#103728)
These comments were confusing because they do not match the code.
1 parent 5f36042 commit 1a19313

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,12 +679,12 @@ void RISCVAsmPrinter::EmitHwasanMemaccessSymbols(Module &M) {
679679
OutStreamer->emitInstruction(
680680
MCInstBuilder(RISCV::LBU).addReg(RISCV::X6).addReg(RISCV::X6).addImm(0),
681681
MCSTI);
682-
// Extract tag from X5 and compare it with loaded tag from shadow
682+
// Extract tag from pointer and compare it with loaded tag from shadow
683683
OutStreamer->emitInstruction(
684684
MCInstBuilder(RISCV::SRLI).addReg(RISCV::X7).addReg(Reg).addImm(56),
685685
MCSTI);
686686
MCSymbol *HandleMismatchOrPartialSym = OutContext.createTempSymbol();
687-
// X7 contains tag from memory, while X6 contains tag from the pointer
687+
// X7 contains tag from the pointer, while X6 contains tag from memory
688688
OutStreamer->emitInstruction(
689689
MCInstBuilder(RISCV::BNE)
690690
.addReg(RISCV::X7)

0 commit comments

Comments
 (0)