For 4 byte instructions we were always setting size to 4 eventually. Same
for 2 byte instructions. So do it as soon as we know the from the opcode.
Add a return to the end of the 4 byte code so we don't have to have an else
around the 2 byte code.
Paths
| Differential D143445
[RISCV] Refactor RISCVDisassembler::getInstruction to remove repeated code. NFC ClosedPublic Authored by craig.topper on Feb 6 2023, 4:31 PM.
Details Summary For 4 byte instructions we were always setting size to 4 eventually. Same Add a return to the end of the 4 byte code so we don't have to have an else
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Feb 6 2023, 5:06 PM
This revision was landed with ongoing or failed builds.Feb 6 2023, 9:24 PM Closed by commit rGc7449c1770ee: [RISCV] Refactor RISCVDisassembler::getInstruction to remove repeated code. NFC (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 495370 llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
|
whitespace change