mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form of
instructions which have no direct register usage. Darwin 'as' accepts: add $0, (%rax) but rejects mov $0, (%rax) for example. Given that, only accept suffix matches which match exactly one form. We still need to emit nice diagnostics for failures... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
28428cd6f3
commit
e9f0fb4179
@ -683,11 +683,6 @@ X86ATTAsmParser::MatchInstruction(const SmallVectorImpl<MCParsedAsmOperand*>
|
|||||||
if (MatchB + MatchW + MatchL == 2)
|
if (MatchB + MatchW + MatchL == 2)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Similarly, if all three matched then we assume this is a generic operation
|
|
||||||
// involving memory, and take the 'l' form (to match 'gas').
|
|
||||||
if (MatchB + MatchW + MatchL == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Otherwise, the match failed.
|
// Otherwise, the match failed.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -4,5 +4,3 @@
|
|||||||
add $0, %eax
|
add $0, %eax
|
||||||
// CHECK: addb $255, %al
|
// CHECK: addb $255, %al
|
||||||
add $0xFF, %al
|
add $0xFF, %al
|
||||||
// CHECK: addl $0, (%rax)
|
|
||||||
add $0, 0(%rax)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user