diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-24 19:13:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-24 19:13:38 +0000 |
commit | ee9102587e7f6fc95de9fc5731b341eeb9bfc3ca (patch) | |
tree | 6e94e02257d5373ceefbc8c8dcf9ba37a1af1f24 /lib/Target/X86 | |
parent | a273442891ae20fd8192526132e3819ea9e5eda9 (diff) | |
download | external_llvm-ee9102587e7f6fc95de9fc5731b341eeb9bfc3ca.zip external_llvm-ee9102587e7f6fc95de9fc5731b341eeb9bfc3ca.tar.gz external_llvm-ee9102587e7f6fc95de9fc5731b341eeb9bfc3ca.tar.bz2 |
MC/X86: Warn on scale factors > 1 without index register, instead of erroring,
for 'as' compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 09950e8..204ccf7 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -588,7 +588,7 @@ X86Operand *X86ATTAsmParser::ParseMemOperand(unsigned SegReg, SMLoc MemStart) { } } } else if (getLexer().isNot(AsmToken::RParen)) { - // Otherwise we have the unsupported form of a scale amount without an + // A scale amount without an index is ignored. // index. SMLoc Loc = Parser.getTok().getLoc(); @@ -596,8 +596,9 @@ X86Operand *X86ATTAsmParser::ParseMemOperand(unsigned SegReg, SMLoc MemStart) { if (getParser().ParseAbsoluteExpression(Value)) return 0; - Error(Loc, "cannot have scale factor without index register"); - return 0; + if (Value != 1) + Warning(Loc, "scale factor without index register is ignored"); + Scale = 1; } } |