Skip to content

Commit 2dc16fb

Browse files
committed
[RISCV] Duplicate pseudo expansion comment to RISCVMCCodeEmitter
Follow-on from D77443. Although we're not fixing any of these pseudo-instructions, the potential for them to be out of sync still exists.
1 parent 3382c24 commit 2dc16fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ void RISCVMCCodeEmitter::encodeInstruction(const MCInst &MI, raw_ostream &OS,
189189
// Get byte count of instruction.
190190
unsigned Size = Desc.getSize();
191191

192+
// RISCVInstrInfo::getInstSizeInBytes hard-codes the number of expanded
193+
// instructions for each pseudo, and must be updated when adding new pseudos
194+
// or changing existing ones.
192195
if (MI.getOpcode() == RISCV::PseudoCALLReg ||
193196
MI.getOpcode() == RISCV::PseudoCALL ||
194197
MI.getOpcode() == RISCV::PseudoTAIL ||

0 commit comments

Comments
 (0)