summaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/HexagonInstrFormats.td
diff options
context:
space:
mode:
authorBrendon Cahoon <bcahoon@codeaurora.org>2012-02-08 18:25:47 +0000
committerBrendon Cahoon <bcahoon@codeaurora.org>2012-02-08 18:25:47 +0000
commitc635ebdb1a366060fe71ef3028ae888fa5e4130d (patch)
tree51a4987a8c9651a3c020d9ae002bc236471fdede /lib/Target/Hexagon/HexagonInstrFormats.td
parent3fd3a840c50fe4ede1b200be18990bc955c536fd (diff)
downloadllvm-c635ebdb1a366060fe71ef3028ae888fa5e4130d.tar.gz
llvm-c635ebdb1a366060fe71ef3028ae888fa5e4130d.tar.bz2
llvm-c635ebdb1a366060fe71ef3028ae888fa5e4130d.tar.xz
Use TSFlag bit to describe instruction properties.
Creating the isPredicated TSFlag enables the code to use the property defined in the instruction format instead of using a large switch statement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/HexagonInstrFormats.td')
-rw-r--r--lib/Target/Hexagon/HexagonInstrFormats.td26
1 files changed, 20 insertions, 6 deletions
diff --git a/lib/Target/Hexagon/HexagonInstrFormats.td b/lib/Target/Hexagon/HexagonInstrFormats.td
index 7e9277655b..65d8a9223b 100644
--- a/lib/Target/Hexagon/HexagonInstrFormats.td
+++ b/lib/Target/Hexagon/HexagonInstrFormats.td
@@ -7,23 +7,37 @@
//
//===----------------------------------------------------------------------===//
+//----------------------------------------------------------------------------//
+// Hexagon Intruction Flags +
+//
+// *** Must match HexagonBaseInfo.h ***
+//----------------------------------------------------------------------------//
+
+
+//----------------------------------------------------------------------------//
+// Intruction Class Declaration +
+//----------------------------------------------------------------------------//
+
class InstHexagon<dag outs, dag ins, string asmstr, list<dag> pattern,
- string cstr,
- InstrItinClass itin> : Instruction {
+ string cstr, InstrItinClass itin> : Instruction {
field bits<32> Inst;
let Namespace = "Hexagon";
-/* Commented out for Hexagon
- bits<2> op;
- let Inst{31-30} = op; */ // Top two bits are the 'op' field
-
dag OutOperandList = outs;
dag InOperandList = ins;
let AsmString = asmstr;
let Pattern = pattern;
let Constraints = cstr;
let Itinerary = itin;
+
+ // *** The code below must match HexagonBaseInfo.h ***
+
+ // Predicated instructions.
+ bits<1> isPredicated = 0;
+ let TSFlags{1} = isPredicated;
+
+ // *** The code above must match HexagonBaseInfo.h ***
}
//----------------------------------------------------------------------------//