[llvm-commits] [llvm] r152443 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp test/MC/X86/x86_errors.s
Kevin Enderby
enderby at apple.com
Fri Mar 9 14:24:10 PST 2012
Author: enderby
Date: Fri Mar 9 16:24:10 2012
New Revision: 152443
URL: http://llvm.org/viewvc/llvm-project?rev=152443&view=rev
Log:
Add the missing call to Error when a bad X86 scale expression is parsed.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/trunk/test/MC/X86/x86_errors.s
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=152443&r1=152442&r2=152443&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Fri Mar 9 16:24:10 2012
@@ -876,8 +876,10 @@
SMLoc Loc = Parser.getTok().getLoc();
int64_t ScaleVal;
- if (getParser().ParseAbsoluteExpression(ScaleVal))
+ if (getParser().ParseAbsoluteExpression(ScaleVal)){
+ Error(Loc, "expected scale expression");
return 0;
+ }
// Validate the scale amount.
if (ScaleVal != 1 && ScaleVal != 2 && ScaleVal != 4 && ScaleVal != 8){
Modified: llvm/trunk/test/MC/X86/x86_errors.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_errors.s?rev=152443&r1=152442&r2=152443&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86_errors.s (original)
+++ llvm/trunk/test/MC/X86/x86_errors.s Fri Mar 9 16:24:10 2012
@@ -20,3 +20,7 @@
// 32: error: instruction requires a CPU feature not currently enabled
sysexitq
+
+// rdar://10710167
+// 64: error: expected scale expression
+lea (%rsp, %rbp, $4), %rax
More information about the llvm-commits
mailing list