mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
MC/X86: Extend suffix matching hack to match 'q' suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103535 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -673,6 +673,8 @@ X86ATTAsmParser::MatchInstruction(const SmallVectorImpl<MCParsedAsmOperand*>
|
|||||||
bool MatchW = MatchInstructionImpl(Operands, Inst);
|
bool MatchW = MatchInstructionImpl(Operands, Inst);
|
||||||
Tmp[Base.size()] = 'l';
|
Tmp[Base.size()] = 'l';
|
||||||
bool MatchL = MatchInstructionImpl(Operands, Inst);
|
bool MatchL = MatchInstructionImpl(Operands, Inst);
|
||||||
|
Tmp[Base.size()] = 'q';
|
||||||
|
bool MatchQ = MatchInstructionImpl(Operands, Inst);
|
||||||
|
|
||||||
// Restore the old token.
|
// Restore the old token.
|
||||||
Op->setTokenValue(Base);
|
Op->setTokenValue(Base);
|
||||||
@@ -680,7 +682,7 @@ X86ATTAsmParser::MatchInstruction(const SmallVectorImpl<MCParsedAsmOperand*>
|
|||||||
// If exactly one matched, then we treat that as a successful match (and the
|
// If exactly one matched, then we treat that as a successful match (and the
|
||||||
// instruction will already have been filled in correctly, since the failing
|
// instruction will already have been filled in correctly, since the failing
|
||||||
// matches won't have modified it).
|
// matches won't have modified it).
|
||||||
if (MatchB + MatchW + MatchL == 2)
|
if (MatchB + MatchW + MatchL + MatchQ == 3)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Otherwise, the match failed.
|
// Otherwise, the match failed.
|
||||||
|
@@ -4,3 +4,7 @@
|
|||||||
add $0, %eax
|
add $0, %eax
|
||||||
// CHECK: addb $255, %al
|
// CHECK: addb $255, %al
|
||||||
add $0xFF, %al
|
add $0xFF, %al
|
||||||
|
// CHECK: orq %rax, %rdx
|
||||||
|
or %rax, %rdx
|
||||||
|
// CHECK: shlq $3, %rax
|
||||||
|
shl $3, %rax
|
||||||
|
Reference in New Issue
Block a user