summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-06 20:10:12 +0000
committerChris Lattner <sabre@nondot.org>2010-09-06 20:10:12 +0000
commit69c7249a6f628db393aaa426c9595dccd4a1d87b (patch)
tree792763c139cc153d1fe6866ba57e091c13ed0df6
parentec6789f4f97ca1701c163132b6e3388366463090 (diff)
downloadllvm-69c7249a6f628db393aaa426c9595dccd4a1d87b.tar.gz
llvm-69c7249a6f628db393aaa426c9595dccd4a1d87b.tar.bz2
llvm-69c7249a6f628db393aaa426c9595dccd4a1d87b.tar.xz
simplify the hacks around jrcxz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113167 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 54288769a0..52ca15ba1a 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -622,9 +622,6 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
// FIXME: We can do jcxz/jecxz, we just don't have the encoding right yet.
if (Name == "jcxz" || Name == "jecxz")
return Error(NameLoc, Name + " cannot be encoded in 64-bit mode");
- } else {
- if (Name == "jrcxz")
- return Error(NameLoc, "jrcxz cannot be encoded in 32-bit mode");
}
// FIXME: Hack to recognize "sal..." and "rep..." for now. We need a way to
@@ -652,7 +649,7 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
// jecxz requires an AdSize prefix but jecxz does not have a prefix in
// 32-bit mode.
.Case("jecxz", "jcxz")
- .Case("jrcxz", "jcxz")
+ .Case("jrcxz", Is64Bit ? "jcxz" : "jrcxz")
.Case("jna", "jbe")
.Case("jnae", "jb")
.Case("jnb", "jae")