[all-commits] [llvm/llvm-project] c7449c: [RISCV] Refactor RISCVDisassembler::getInstruction...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon Feb 6 21:24:22 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c7449c1770eef0345c32e2b6ad5344e9a06ed2c5
https://github.com/llvm/llvm-project/commit/c7449c1770eef0345c32e2b6ad5344e9a06ed2c5
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
Log Message:
-----------
[RISCV] Refactor RISCVDisassembler::getInstruction to remove repeated code. NFC
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.
Differential Revision: https://reviews.llvm.org/D143445
More information about the All-commits
mailing list