aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-10-31 19:22:57 +0000
committerChris Lattner <sabre@nondot.org>2010-10-31 19:22:57 +0000
commit150d20e8fcadda6600bbb2e188c17a35b8ec7cbd (patch)
tree845941644d1d7e4946834828ecaf98c802cd071d /utils
parenta4a3a5e3c212e7b4ac84fec94c9a140f120f3ff6 (diff)
downloadexternal_llvm-150d20e8fcadda6600bbb2e188c17a35b8ec7cbd.zip
external_llvm-150d20e8fcadda6600bbb2e188c17a35b8ec7cbd.tar.gz
external_llvm-150d20e8fcadda6600bbb2e188c17a35b8ec7cbd.tar.bz2
fix the !eq operator in tblgen to return a bit instead of an int.
Use this to make the X86 and ARM targets set isCodeGenOnly=1 automatically for their instructions that have Format=Pseudo, resolving a hack in tblgen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/AsmMatcherEmitter.cpp15
-rw-r--r--utils/TableGen/TGParser.cpp2
2 files changed, 1 insertions, 16 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp
index 0fad96e..6ddccc2 100644
--- a/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/utils/TableGen/AsmMatcherEmitter.cpp
@@ -223,21 +223,6 @@ static bool IsAssemblerInstruction(StringRef Name,
if (CGI.TheDef->getValueAsBit("isCodeGenOnly"))
return false;
- // Ignore pseudo ops.
- //
- // FIXME: This is a hack [for X86]; can we convert these instructions to set
- // the "codegen only" bit instead?
- if (const RecordVal *Form = CGI.TheDef->getValue("Form"))
- if (Form->getValue()->getAsString() == "Pseudo")
- return false;
-
- // FIXME: This is a hack [for ARM]; can we convert these instructions to set
- // the "codegen only" bit instead?
- if (const RecordVal *Form = CGI.TheDef->getValue("F"))
- if (Form->getValue()->getAsString() == "Pseudo")
- return false;
-
-
// Ignore "Int_*" and "*_Int" instructions, which are internal aliases.
//
// FIXME: This is a total hack.
diff --git a/utils/TableGen/TGParser.cpp b/utils/TableGen/TGParser.cpp
index 1f4b07b..7bd2fbc 100644
--- a/utils/TableGen/TGParser.cpp
+++ b/utils/TableGen/TGParser.cpp
@@ -812,7 +812,7 @@ Init *TGParser::ParseOperation(Record *CurRec) {
case tgtok::XSRA: Code = BinOpInit::SRA; Type = new IntRecTy(); break;
case tgtok::XSRL: Code = BinOpInit::SRL; Type = new IntRecTy(); break;
case tgtok::XSHL: Code = BinOpInit::SHL; Type = new IntRecTy(); break;
- case tgtok::XEq: Code = BinOpInit::EQ; Type = new IntRecTy(); break;
+ case tgtok::XEq: Code = BinOpInit::EQ; Type = new BitRecTy(); break;
case tgtok::XStrConcat:
Code = BinOpInit::STRCONCAT;
Type = new StringRecTy();