aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/AsmParser/X86AsmParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/AsmParser/X86AsmParser.cpp')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 6826223fd8..bb6e05c286 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -1020,6 +1020,14 @@ 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];