mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
fix some bugs in the alias support, unblocking changing of "clr" aliases
from c++ hacks to proper .td InstAlias definitions. Change them! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118330 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -983,17 +983,6 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
|
||||
Operands[0] = X86Operand::CreateToken("fstps", NameLoc);
|
||||
}
|
||||
|
||||
|
||||
// "clr <reg>" -> "xor <reg>, <reg>".
|
||||
if ((Name == "clrb" || Name == "clrw" || Name == "clrl" || Name == "clrq" ||
|
||||
Name == "clr") && Operands.size() == 2 &&
|
||||
static_cast<X86Operand*>(Operands[1])->isReg()) {
|
||||
unsigned RegNo = static_cast<X86Operand*>(Operands[1])->getReg();
|
||||
Operands.push_back(X86Operand::CreateReg(RegNo, NameLoc, NameLoc));
|
||||
delete Operands[0];
|
||||
Operands[0] = X86Operand::CreateToken("xor", NameLoc);
|
||||
}
|
||||
|
||||
// FIXME: Hack to handle recognize "aa[dm]" -> "aa[dm] $0xA".
|
||||
if ((Name.startswith("aad") || Name.startswith("aam")) &&
|
||||
Operands.size() == 1) {
|
||||
|
Reference in New Issue
Block a user