[PATCH] D35115: Clang's assembler crashes if Scale in lea is negative (pr33661)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 06:11:54 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:532
+    }
+    bool onRegister(unsigned Reg, StringRef &ErrMsg) {
       IntelExprState CurrState = State;
----------------
Add newlines before/after the function and pass it through clang-format


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:553
+          if(checkScale(ErrMsg))
+            return true;
           IC.pushOperand(IC_IMM);
----------------
```
if (checkScale(ErrMsg))
  return true;
```


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:605
+          if(checkScale(ErrMsg))
             return true;
           // Get the scale and replace the 'Register * Scale' with '0'.
----------------
```
if (checkScale(ErrMsg))
  return true;
```


================
Comment at: test/CodeGen/ARM/arguments-nosplit-double.ll:11
 
+; CHECK-LABEL: f:
 ; CHECK-NOT: r3
----------------
NFC commit?


================
Comment at: test/CodeGen/ARM/arguments-nosplit-i64.ll:11
 
+; CHECK-LABEL: f:
 ; CHECK-NOT: r3
----------------
NFC commit?


https://reviews.llvm.org/D35115





More information about the llvm-commits mailing list