diff options
Diffstat (limited to 'lib/Target/Hexagon/Hexagon.td')
-rw-r--r-- | lib/Target/Hexagon/Hexagon.td | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/lib/Target/Hexagon/Hexagon.td b/lib/Target/Hexagon/Hexagon.td index 5f4a6c6..f892c9f 100644 --- a/lib/Target/Hexagon/Hexagon.td +++ b/lib/Target/Hexagon/Hexagon.td @@ -21,35 +21,23 @@ include "llvm/Target/Target.td" // Hexagon Subtarget features. //===----------------------------------------------------------------------===// -// Hexagon Archtectures -def ArchV2 : SubtargetFeature<"v2", "HexagonArchVersion", "V2", - "Hexagon v2">; -def ArchV3 : SubtargetFeature<"v3", "HexagonArchVersion", "V3", - "Hexagon v3">; -def ArchV4 : SubtargetFeature<"v4", "HexagonArchVersion", "V4", - "Hexagon v4">; -def ArchV5 : SubtargetFeature<"v5", "HexagonArchVersion", "V5", - "Hexagon v5">; +// Hexagon Architectures +def ArchV4: SubtargetFeature<"v4", "HexagonArchVersion", "V4", "Hexagon V4">; +def ArchV5: SubtargetFeature<"v5", "HexagonArchVersion", "V5", "Hexagon V5">; //===----------------------------------------------------------------------===// // Hexagon Instruction Predicate Definitions. //===----------------------------------------------------------------------===// -def HasV2T : Predicate<"Subtarget.hasV2TOps()">; -def HasV2TOnly : Predicate<"Subtarget.hasV2TOpsOnly()">; -def NoV2T : Predicate<"!Subtarget.hasV2TOps()">; -def HasV3T : Predicate<"Subtarget.hasV3TOps()">; -def HasV3TOnly : Predicate<"Subtarget.hasV3TOpsOnly()">; -def NoV3T : Predicate<"!Subtarget.hasV3TOps()">; -def HasV4T : Predicate<"Subtarget.hasV4TOps()">; -def NoV4T : Predicate<"!Subtarget.hasV4TOps()">; -def HasV5T : Predicate<"Subtarget.hasV5TOps()">; -def NoV5T : Predicate<"!Subtarget.hasV5TOps()">; -def UseMEMOP : Predicate<"Subtarget.useMemOps()">; -def IEEERndNearV5T : Predicate<"Subtarget.modeIEEERndNear()">; +def HasV5T : Predicate<"Subtarget->hasV5TOps()">; +def NoV5T : Predicate<"!Subtarget->hasV5TOps()">; +def UseMEMOP : Predicate<"Subtarget->useMemOps()">; +def IEEERndNearV5T : Predicate<"Subtarget->modeIEEERndNear()">; //===----------------------------------------------------------------------===// // Classes used for relation maps. //===----------------------------------------------------------------------===// + +class ImmRegShl; // PredRel - Filter class used to relate non-predicated instructions with their // predicated forms. class PredRel; @@ -137,7 +125,7 @@ def getPredOldOpcode : InstrMapping { // def getNewValueOpcode : InstrMapping { let FilterClass = "NewValueRel"; - let RowFields = ["BaseOpcode", "PredSense", "PNewValue"]; + let RowFields = ["BaseOpcode", "PredSense", "PNewValue", "addrMode"]; let ColFields = ["NValueST"]; let KeyCol = ["false"]; let ValueCols = [["true"]]; @@ -149,7 +137,7 @@ def getNewValueOpcode : InstrMapping { // def getNonNVStore : InstrMapping { let FilterClass = "NewValueRel"; - let RowFields = ["BaseOpcode", "PredSense", "PNewValue"]; + let RowFields = ["BaseOpcode", "PredSense", "PNewValue", "addrMode"]; let ColFields = ["NValueST"]; let KeyCol = ["true"]; let ValueCols = [["false"]]; @@ -180,6 +168,14 @@ def getRegForm : InstrMapping { let ValueCols = [["reg"]]; } +def getRegShlForm : InstrMapping { + let FilterClass = "ImmRegShl"; + let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore"]; + let ColFields = ["InputType"]; + let KeyCol = ["imm"]; + let ValueCols = [["reg"]]; +} + //===----------------------------------------------------------------------===// // Register File, Calling Conv, Instruction Descriptions //===----------------------------------------------------------------------===// @@ -200,8 +196,10 @@ class Proc<string Name, SchedMachineModel Model, list<SubtargetFeature> Features> : ProcessorModel<Name, Model, Features>; -def : Proc<"hexagonv4", HexagonModelV4, [ArchV2, ArchV3, ArchV4]>; -def : Proc<"hexagonv5", HexagonModelV4, [ArchV2, ArchV3, ArchV4, ArchV5]>; +def : Proc<"hexagonv4", HexagonModelV4, + [ArchV4]>; +def : Proc<"hexagonv5", HexagonModelV4, + [ArchV4, ArchV5]>; //===----------------------------------------------------------------------===// // Declare the target which we are implementing |