[PATCH] D36788: The issues with X86 prefixes

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 20 23:40:11 PDT 2017


craig.topper added inline comments.


================
Comment at: lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp:384
 
-    if (insn->readerCursor - 1 == insn->startLocation
-        && (byte == 0xf2 || byte == 0xf3)
-        && !lookAtByte(insn, &nextByte))
-    {
+    if (/* insn->readerCursor - 1 == insn->startLocation && */ (byte == 0xf2 ||
+                                                                byte == 0xf3) &&
----------------
Don't leave around commented out code


================
Comment at: lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp:394
        */
-      if ((byte == 0xf2 || byte == 0xf3) &&
+      if (/* (byte == 0xf2 || byte == 0xf3) && */
           ((nextByte == 0xf0) ||
----------------
Remove commented out code


================
Comment at: lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp:421
+          nextByte != 0xf2 && nextByte != 0xf3 && nextByte != 0x66
+           && nextByte != 0x90 && !isREX(nextByte))
         break;
----------------
First '&&' should be on the previous line.


https://reviews.llvm.org/D36788





More information about the llvm-commits mailing list