[PATCH] D98540: [M68k] Implement Disassembler
Ricky Taylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 14 06:21:24 PDT 2021
ricky26 added a reviewer: RKSimon.
ricky26 added a comment.
I think this is now ready for review proper.
I've done a pass tidying up the code style and I've added some encoding checks to the MC test added in the assembler.
================
Comment at: llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp:62
+ void dump() const {
+ for (unsigned I = 0; I < Buffer.size(); ++I) {
+ for (unsigned B = 0; B < 16; ++B) {
----------------
RKSimon wrote:
> (style) Don't re-evaluate a fixed array length.
> ```
> for (unsigned I = 0, E = Buffer.size(); I != E; ++I) {`
> ```
>
> Alternatively, AFAICT you might be able to use a for-range loop:
> ```
> for (const auto &BufferValue : Buffer)
> ```
I did go through all of the loops and I only found one case where I wasn't doing something funny with the iterator (clamping the length for arrays, stepping by 2, for ex.). If I've missed any please, shout!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98540/new/
https://reviews.llvm.org/D98540
More information about the llvm-commits
mailing list