Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,9 @@ DecodeStatus RISCVDisassembler::getInstruction32(MCInst &MI, uint64_t &Size,
}
Size = 4;

uint32_t Insn = support::endian::read32le(Bytes.data());
// Use uint64_t to match getInstruction48. decodeInstruction is templated
// on the Insn type.
uint64_t Insn = support::endian::read32le(Bytes.data());

for (const DecoderListEntry &Entry : DecoderList32) {
if (!Entry.haveContainedFeatures(STI.getFeatureBits()))
Expand Down Expand Up @@ -857,7 +859,9 @@ DecodeStatus RISCVDisassembler::getInstruction16(MCInst &MI, uint64_t &Size,
}
Size = 2;

uint32_t Insn = support::endian::read16le(Bytes.data());
// Use uint64_t to match getInstruction48. decodeInstruction is templated
// on the Insn type.
uint64_t Insn = support::endian::read16le(Bytes.data());

for (const DecoderListEntry &Entry : DecoderList16) {
if (!Entry.haveContainedFeatures(STI.getFeatureBits()))
Expand Down
Loading