aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/AsmParser/X86AsmParser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-01 21:06:34 +0000
committerChris Lattner <sabre@nondot.org>2010-11-01 21:06:34 +0000
commit99f535242c71d795c11bf54aa6d30ddbed465e9a (patch)
tree8dafb725330880d3d9d89adf6e2a35a734f956f9 /lib/Target/X86/AsmParser/X86AsmParser.cpp
parent40a5eb18b031fa1a5e9697e21e251e613d441cc5 (diff)
downloadexternal_llvm-99f535242c71d795c11bf54aa6d30ddbed465e9a.zip
external_llvm-99f535242c71d795c11bf54aa6d30ddbed465e9a.tar.gz
external_llvm-99f535242c71d795c11bf54aa6d30ddbed465e9a.tar.bz2
use our fancy new MnemonicAlias mechanism to remove a bunch of hacks
from X86AsmParser.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmParser/X86AsmParser.cpp')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 21faa96..e57e34f 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -969,14 +969,6 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
NameLoc);
}
- // call foo is not ambiguous with callw.
- if (Name == "call" && Operands.size() == 2) {
- const char *NewName = Is64Bit ? "callq" : "calll";
- delete Operands[0];
- Operands[0] = X86Operand::CreateToken(NewName, NameLoc);
- Name = NewName;
- }
-
// movsd -> movsl (when no operands are specified).
if (Name == "movsd" && Operands.size() == 1) {
delete Operands[0];
@@ -1009,46 +1001,6 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
Operands.push_back(X86Operand::CreateImm(A, NameLoc, NameLoc));
}
- // "lgdtl" is not ambiguous 32-bit mode and is the same as "lgdt".
- // "lgdtq" is not ambiguous 64-bit mode and is the same as "lgdt".
- if ((Name == "lgdtl" && Is64Bit == false) ||
- (Name == "lgdtq" && Is64Bit == true)) {
- const char *NewName = "lgdt";
- delete Operands[0];
- Operands[0] = X86Operand::CreateToken(NewName, NameLoc);
- Name = NewName;
- }
-
- // "lidtl" is not ambiguous 32-bit mode and is the same as "lidt".
- // "lidtq" is not ambiguous 64-bit mode and is the same as "lidt".
- if ((Name == "lidtl" && Is64Bit == false) ||
- (Name == "lidtq" && Is64Bit == true)) {
- const char *NewName = "lidt";
- delete Operands[0];
- Operands[0] = X86Operand::CreateToken(NewName, NameLoc);
- Name = NewName;
- }
-
- // "sgdtl" is not ambiguous 32-bit mode and is the same as "sgdt".
- // "sgdtq" is not ambiguous 64-bit mode and is the same as "sgdt".
- if ((Name == "sgdtl" && Is64Bit == false) ||
- (Name == "sgdtq" && Is64Bit == true)) {
- const char *NewName = "sgdt";
- delete Operands[0];
- Operands[0] = X86Operand::CreateToken(NewName, NameLoc);
- Name = NewName;
- }
-
- // "sidtl" is not ambiguous 32-bit mode and is the same as "sidt".
- // "sidtq" is not ambiguous 64-bit mode and is the same as "sidt".
- if ((Name == "sidtl" && Is64Bit == false) ||
- (Name == "sidtq" && Is64Bit == true)) {
- const char *NewName = "sidt";
- delete Operands[0];
- Operands[0] = X86Operand::CreateToken(NewName, NameLoc);
- Name = NewName;
- }
-
return false;
}