[PATCH] D24612: [AAP] (8) Add AAP Disassembler support

Simon Cook via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 16:01:00 PDT 2016


simoncook requested changes to this revision.
simoncook added a reviewer: simoncook.
simoncook added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Target/AAP/Disassembler/AAPDisassembler.cpp:76
+  // First try a 16-bit instruction
+  Insn = (Bytes[1] << 8) | (Bytes[0] << 0);
+
----------------
You may want to do a bounds check to check that you have enough data to read.


================
Comment at: lib/Target/AAP/Disassembler/AAPDisassembler.cpp:86
+  // Finally try a 32-bit instruction
+  Insn =
+      (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
----------------
Same as above comment


https://reviews.llvm.org/D24612





More information about the llvm-commits mailing list