2012-02-18 20:03:15 +08:00
|
|
|
//===-- Hexagon.td - Describe the Hexagon Target Machine --*- tablegen -*--===//
|
2011-12-13 05:14:40 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2012-02-18 20:03:15 +08:00
|
|
|
// This is the top level entry point for the Hexagon target.
|
2011-12-13 05:14:40 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Target-independent interfaces which we are implementing
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "llvm/Target/Target.td"
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Hexagon Subtarget features.
|
2012-02-18 20:03:15 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2015-02-10 05:56:37 +08:00
|
|
|
// Hexagon Architectures
|
2017-02-10 23:33:13 +08:00
|
|
|
include "HexagonDepArch.td"
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
// Hexagon ISA Extensions
|
2017-12-12 02:57:54 +08:00
|
|
|
def ExtensionHVX: SubtargetFeature<"hvx", "HexagonHVXVersion",
|
2017-10-19 02:07:07 +08:00
|
|
|
"Hexagon::ArchEnum::V60", "Hexagon HVX instructions">;
|
2017-12-12 02:57:54 +08:00
|
|
|
def ExtensionHVXV60: SubtargetFeature<"hvxv60", "HexagonHVXVersion",
|
|
|
|
"Hexagon::ArchEnum::V60", "Hexagon HVX instructions",
|
|
|
|
[ExtensionHVX]>;
|
2017-10-19 02:07:07 +08:00
|
|
|
def ExtensionHVXV62: SubtargetFeature<"hvxv62", "HexagonHVXVersion",
|
|
|
|
"Hexagon::ArchEnum::V62", "Hexagon HVX instructions",
|
2017-12-12 02:57:54 +08:00
|
|
|
[ExtensionHVX,ExtensionHVXV60]>;
|
|
|
|
def ExtensionHVXV65: SubtargetFeature<"hvxv65", "HexagonHVXVersion",
|
|
|
|
"Hexagon::ArchEnum::V65", "Hexagon HVX instructions",
|
|
|
|
[ExtensionHVX,ExtensionHVXV60, ExtensionHVXV62]>;
|
2017-10-19 02:07:07 +08:00
|
|
|
|
2018-04-04 00:06:36 +08:00
|
|
|
def ExtensionHVX64B: SubtargetFeature<"hvx-length64b", "UseHVX64BOps",
|
|
|
|
"true", "Hexagon HVX 64B instructions", [ExtensionHVX]>;
|
|
|
|
def ExtensionHVX128B: SubtargetFeature<"hvx-length128b", "UseHVX128BOps",
|
|
|
|
"true", "Hexagon HVX 128B instructions", [ExtensionHVX]>;
|
2017-10-19 02:07:07 +08:00
|
|
|
|
2018-03-13 01:47:46 +08:00
|
|
|
def FeaturePackets: SubtargetFeature<"packets", "UsePackets", "true",
|
|
|
|
"Support for instruction packets">;
|
2016-07-25 22:42:11 +08:00
|
|
|
def FeatureLongCalls: SubtargetFeature<"long-calls", "UseLongCalls", "true",
|
|
|
|
"Use constant-extended calls">;
|
2017-12-12 02:57:54 +08:00
|
|
|
def FeatureMemNoShuf: SubtargetFeature<"mem_noshuf", "HasMemNoShuf", "false",
|
|
|
|
"Supports mem_noshuf feature">;
|
2018-05-15 04:09:07 +08:00
|
|
|
def FeatureMemops: SubtargetFeature<"memops", "UseMemops", "true",
|
|
|
|
"Use memop instructions">;
|
2018-04-04 00:06:36 +08:00
|
|
|
def FeatureNVJ: SubtargetFeature<"nvj", "UseNewValueJumps", "true",
|
2018-03-13 01:47:46 +08:00
|
|
|
"Support for new-value jumps", [FeaturePackets]>;
|
2018-05-15 04:41:04 +08:00
|
|
|
def FeatureNVS: SubtargetFeature<"nvs", "UseNewValueStores", "true",
|
|
|
|
"Support for new-value stores", [FeaturePackets]>;
|
2018-05-15 05:01:56 +08:00
|
|
|
def FeatureSmallData: SubtargetFeature<"small-data", "UseSmallData", "true",
|
|
|
|
"Allow GP-relative addressing of global variables">;
|
2018-04-04 00:06:36 +08:00
|
|
|
def FeatureDuplex: SubtargetFeature<"duplex", "EnableDuplex", "true",
|
2017-12-12 02:57:54 +08:00
|
|
|
"Enable generation of duplex instruction">;
|
2018-03-01 04:29:36 +08:00
|
|
|
def FeatureReservedR19: SubtargetFeature<"reserved-r19", "ReservedR19",
|
|
|
|
"true", "Reserve register R19">;
|
2015-11-09 12:07:48 +08:00
|
|
|
|
2012-12-04 12:29:16 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Hexagon Instruction Predicate Definitions.
|
|
|
|
//===----------------------------------------------------------------------===//
|
2017-02-10 23:33:13 +08:00
|
|
|
|
2018-05-15 04:09:07 +08:00
|
|
|
def UseMEMOPS : Predicate<"HST->useMemops()">;
|
2017-10-19 02:07:07 +08:00
|
|
|
def UseHVX64B : Predicate<"HST->useHVX64BOps()">,
|
|
|
|
AssemblerPredicate<"ExtensionHVX64B">;
|
|
|
|
def UseHVX128B : Predicate<"HST->useHVX128BOps()">,
|
|
|
|
AssemblerPredicate<"ExtensionHVX128B">;
|
|
|
|
def UseHVX : Predicate<"HST->useHVXOps()">,
|
|
|
|
AssemblerPredicate<"ExtensionHVXV60">;
|
|
|
|
def UseHVXV60 : Predicate<"HST->useHVXOps()">,
|
|
|
|
AssemblerPredicate<"ExtensionHVXV60">;
|
|
|
|
def UseHVXV62 : Predicate<"HST->useHVXOps()">,
|
|
|
|
AssemblerPredicate<"ExtensionHVXV62">;
|
2017-12-12 02:57:54 +08:00
|
|
|
def UseHVXV65 : Predicate<"HST->useHVXOps()">,
|
|
|
|
AssemblerPredicate<"ExtensionHVXV65">;
|
2017-10-19 02:07:07 +08:00
|
|
|
|
2018-04-04 00:06:36 +08:00
|
|
|
def Hvx64: HwMode<"+hvx-length64b">;
|
|
|
|
def Hvx128: HwMode<"+hvx-length128b">;
|
2017-09-15 23:46:05 +08:00
|
|
|
|
2012-12-04 12:29:16 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Classes used for relation maps.
|
|
|
|
//===----------------------------------------------------------------------===//
|
2014-12-31 02:58:47 +08:00
|
|
|
|
|
|
|
class ImmRegShl;
|
2017-12-12 02:57:54 +08:00
|
|
|
// ImmRegRel - Filter class used to relate instructions having reg-reg form
|
|
|
|
// with their reg-imm counterparts.
|
|
|
|
class ImmRegRel;
|
2012-12-04 12:29:16 +08:00
|
|
|
// PredRel - Filter class used to relate non-predicated instructions with their
|
|
|
|
// predicated forms.
|
|
|
|
class PredRel;
|
|
|
|
// PredNewRel - Filter class used to relate predicated instructions with their
|
|
|
|
// predicate-new forms.
|
|
|
|
class PredNewRel: PredRel;
|
|
|
|
// NewValueRel - Filter class used to relate regular store instructions with
|
|
|
|
// their new-value store form.
|
|
|
|
class NewValueRel: PredNewRel;
|
|
|
|
// NewValueRel - Filter class used to relate load/store instructions having
|
|
|
|
// different addressing modes with each other.
|
|
|
|
class AddrModeRel: NewValueRel;
|
2017-12-12 02:57:54 +08:00
|
|
|
class PostInc_BaseImm;
|
2015-11-24 22:55:26 +08:00
|
|
|
class IntrinsicsRel;
|
2012-12-04 12:29:16 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Generate mapping table to relate non-predicate instructions with their
|
|
|
|
// predicated formats - true and false.
|
|
|
|
//
|
|
|
|
|
|
|
|
def getPredOpcode : InstrMapping {
|
|
|
|
let FilterClass = "PredRel";
|
|
|
|
// Instructions with the same BaseOpcode and isNVStore values form a row.
|
2017-02-10 23:33:13 +08:00
|
|
|
let RowFields = ["BaseOpcode", "isNVStore", "PNewValue", "isBrTaken", "isNT"];
|
2012-12-04 12:29:16 +08:00
|
|
|
// Instructions with the same predicate sense form a column.
|
|
|
|
let ColFields = ["PredSense"];
|
|
|
|
// The key column is the unpredicated instructions.
|
|
|
|
let KeyCol = [""];
|
|
|
|
// Value columns are PredSense=true and PredSense=false
|
|
|
|
let ValueCols = [["true"], ["false"]];
|
|
|
|
}
|
|
|
|
|
2013-05-07 02:49:23 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Generate mapping table to relate predicate-true instructions with their
|
|
|
|
// predicate-false forms
|
|
|
|
//
|
|
|
|
def getFalsePredOpcode : InstrMapping {
|
|
|
|
let FilterClass = "PredRel";
|
2015-10-17 09:33:04 +08:00
|
|
|
let RowFields = ["BaseOpcode", "PNewValue", "isNVStore", "isBrTaken", "isNT"];
|
2013-05-07 02:49:23 +08:00
|
|
|
let ColFields = ["PredSense"];
|
|
|
|
let KeyCol = ["true"];
|
|
|
|
let ValueCols = [["false"]];
|
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Generate mapping table to relate predicate-false instructions with their
|
|
|
|
// predicate-true forms
|
|
|
|
//
|
|
|
|
def getTruePredOpcode : InstrMapping {
|
|
|
|
let FilterClass = "PredRel";
|
2015-10-17 09:33:04 +08:00
|
|
|
let RowFields = ["BaseOpcode", "PNewValue", "isNVStore", "isBrTaken", "isNT"];
|
2013-05-07 02:49:23 +08:00
|
|
|
let ColFields = ["PredSense"];
|
|
|
|
let KeyCol = ["false"];
|
|
|
|
let ValueCols = [["true"]];
|
|
|
|
}
|
|
|
|
|
2012-12-04 12:29:16 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Generate mapping table to relate predicated instructions with their .new
|
|
|
|
// format.
|
|
|
|
//
|
|
|
|
def getPredNewOpcode : InstrMapping {
|
|
|
|
let FilterClass = "PredNewRel";
|
2013-05-02 05:37:34 +08:00
|
|
|
let RowFields = ["BaseOpcode", "PredSense", "isNVStore", "isBrTaken"];
|
2012-12-04 12:29:16 +08:00
|
|
|
let ColFields = ["PNewValue"];
|
|
|
|
let KeyCol = [""];
|
|
|
|
let ValueCols = [["new"]];
|
|
|
|
}
|
|
|
|
|
2013-05-11 04:58:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Generate mapping table to relate .new predicated instructions with their old
|
|
|
|
// format.
|
|
|
|
//
|
|
|
|
def getPredOldOpcode : InstrMapping {
|
|
|
|
let FilterClass = "PredNewRel";
|
2017-02-10 23:33:13 +08:00
|
|
|
let RowFields = ["BaseOpcode", "PredSense", "isNVStore", "isBrTaken"];
|
2013-05-11 04:58:11 +08:00
|
|
|
let ColFields = ["PNewValue"];
|
|
|
|
let KeyCol = ["new"];
|
|
|
|
let ValueCols = [[""]];
|
|
|
|
}
|
|
|
|
|
2012-12-04 12:29:16 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Generate mapping table to relate store instructions with their new-value
|
|
|
|
// format.
|
|
|
|
//
|
|
|
|
def getNewValueOpcode : InstrMapping {
|
|
|
|
let FilterClass = "NewValueRel";
|
2015-10-17 09:33:04 +08:00
|
|
|
let RowFields = ["BaseOpcode", "PredSense", "PNewValue", "addrMode", "isNT"];
|
2013-05-11 04:27:34 +08:00
|
|
|
let ColFields = ["NValueST"];
|
|
|
|
let KeyCol = ["false"];
|
|
|
|
let ValueCols = [["true"]];
|
2012-12-04 12:29:16 +08:00
|
|
|
}
|
|
|
|
|
2013-05-11 04:58:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Generate mapping table to relate new-value store instructions with their old
|
|
|
|
// format.
|
|
|
|
//
|
|
|
|
def getNonNVStore : InstrMapping {
|
|
|
|
let FilterClass = "NewValueRel";
|
2015-10-17 09:33:04 +08:00
|
|
|
let RowFields = ["BaseOpcode", "PredSense", "PNewValue", "addrMode", "isNT"];
|
2013-05-11 04:58:11 +08:00
|
|
|
let ColFields = ["NValueST"];
|
|
|
|
let KeyCol = ["true"];
|
|
|
|
let ValueCols = [["false"]];
|
|
|
|
}
|
|
|
|
|
2017-10-06 04:01:38 +08:00
|
|
|
def changeAddrMode_abs_io: InstrMapping {
|
2012-12-04 12:29:16 +08:00
|
|
|
let FilterClass = "AddrModeRel";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore",
|
2015-10-21 03:04:53 +08:00
|
|
|
"isFloat"];
|
2012-12-04 12:29:16 +08:00
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["Absolute"];
|
|
|
|
let ValueCols = [["BaseImmOffset"]];
|
|
|
|
}
|
|
|
|
|
2017-10-06 04:01:38 +08:00
|
|
|
def changeAddrMode_io_abs: InstrMapping {
|
2016-04-29 23:49:13 +08:00
|
|
|
let FilterClass = "AddrModeRel";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore",
|
|
|
|
"isFloat"];
|
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["BaseImmOffset"];
|
|
|
|
let ValueCols = [["Absolute"]];
|
|
|
|
}
|
|
|
|
|
2017-10-06 04:01:38 +08:00
|
|
|
def changeAddrMode_io_rr: InstrMapping {
|
2012-12-04 12:29:16 +08:00
|
|
|
let FilterClass = "AddrModeRel";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore"];
|
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["BaseImmOffset"];
|
|
|
|
let ValueCols = [["BaseRegOffset"]];
|
|
|
|
}
|
|
|
|
|
2017-10-06 04:01:38 +08:00
|
|
|
def changeAddrMode_rr_io: InstrMapping {
|
2016-04-29 23:49:13 +08:00
|
|
|
let FilterClass = "AddrModeRel";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore"];
|
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["BaseRegOffset"];
|
|
|
|
let ValueCols = [["BaseImmOffset"]];
|
|
|
|
}
|
|
|
|
|
2017-12-12 02:57:54 +08:00
|
|
|
def changeAddrMode_pi_io: InstrMapping {
|
|
|
|
let FilterClass = "PostInc_BaseImm";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore"];
|
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["PostInc"];
|
|
|
|
let ValueCols = [["BaseImmOffset"]];
|
|
|
|
}
|
|
|
|
|
|
|
|
def changeAddrMode_io_pi: InstrMapping {
|
|
|
|
let FilterClass = "PostInc_BaseImm";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore"];
|
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["BaseImmOffset"];
|
|
|
|
let ValueCols = [["PostInc"]];
|
|
|
|
}
|
|
|
|
|
2017-10-06 04:01:38 +08:00
|
|
|
def changeAddrMode_rr_ur: InstrMapping {
|
2016-04-29 23:49:13 +08:00
|
|
|
let FilterClass = "ImmRegShl";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore"];
|
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["BaseRegOffset"];
|
|
|
|
let ValueCols = [["BaseLongOffset"]];
|
|
|
|
}
|
|
|
|
|
2017-10-06 04:01:38 +08:00
|
|
|
def changeAddrMode_ur_rr : InstrMapping {
|
|
|
|
let FilterClass = "ImmRegShl";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue", "isNVStore"];
|
|
|
|
let ColFields = ["addrMode"];
|
|
|
|
let KeyCol = ["BaseLongOffset"];
|
|
|
|
let ValueCols = [["BaseRegOffset"]];
|
|
|
|
}
|
|
|
|
|
2012-12-04 12:29:16 +08:00
|
|
|
def getRegForm : InstrMapping {
|
|
|
|
let FilterClass = "ImmRegRel";
|
|
|
|
let RowFields = ["CextOpcode", "PredSense", "PNewValue"];
|
|
|
|
let ColFields = ["InputType"];
|
|
|
|
let KeyCol = ["imm"];
|
|
|
|
let ValueCols = [["reg"]];
|
|
|
|
}
|
|
|
|
|
2015-11-24 22:55:26 +08:00
|
|
|
def notTakenBranchPrediction : InstrMapping {
|
|
|
|
let FilterClass = "PredRel";
|
|
|
|
let RowFields = ["BaseOpcode", "PNewValue", "PredSense", "isBranch", "isPredicated"];
|
|
|
|
let ColFields = ["isBrTaken"];
|
|
|
|
let KeyCol = ["true"];
|
|
|
|
let ValueCols = [["false"]];
|
|
|
|
}
|
|
|
|
|
|
|
|
def takenBranchPrediction : InstrMapping {
|
|
|
|
let FilterClass = "PredRel";
|
|
|
|
let RowFields = ["BaseOpcode", "PNewValue", "PredSense", "isBranch", "isPredicated"];
|
|
|
|
let ColFields = ["isBrTaken"];
|
|
|
|
let KeyCol = ["false"];
|
|
|
|
let ValueCols = [["true"]];
|
|
|
|
}
|
|
|
|
|
|
|
|
def getRealHWInstr : InstrMapping {
|
|
|
|
let FilterClass = "IntrinsicsRel";
|
|
|
|
let RowFields = ["BaseOpcode"];
|
|
|
|
let ColFields = ["InstrType"];
|
|
|
|
let KeyCol = ["Pseudo"];
|
|
|
|
let ValueCols = [["Pseudo"], ["Real"]];
|
|
|
|
}
|
2011-12-13 05:14:40 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2017-12-12 02:57:54 +08:00
|
|
|
// Register File, Instruction Descriptions
|
2011-12-13 05:14:40 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
include "HexagonSchedule.td"
|
|
|
|
include "HexagonRegisterInfo.td"
|
2017-02-10 23:33:13 +08:00
|
|
|
include "HexagonOperands.td"
|
|
|
|
include "HexagonDepOperands.td"
|
|
|
|
include "HexagonDepITypes.td"
|
|
|
|
include "HexagonInstrFormats.td"
|
|
|
|
include "HexagonDepInstrFormats.td"
|
|
|
|
include "HexagonDepInstrInfo.td"
|
2018-02-09 23:30:02 +08:00
|
|
|
include "HexagonCallingConv.td"
|
2017-02-10 23:33:13 +08:00
|
|
|
include "HexagonPseudo.td"
|
2016-11-05 23:01:38 +08:00
|
|
|
include "HexagonPatterns.td"
|
2018-02-07 04:22:20 +08:00
|
|
|
include "HexagonPatternsHVX.td"
|
2017-12-12 02:57:54 +08:00
|
|
|
include "HexagonPatternsV65.td"
|
2017-02-10 23:33:13 +08:00
|
|
|
include "HexagonDepMappings.td"
|
2011-12-13 05:14:40 +08:00
|
|
|
include "HexagonIntrinsics.td"
|
2017-02-11 07:46:45 +08:00
|
|
|
include "HexagonMapAsm2IntrinV62.gen.td"
|
2017-12-12 02:57:54 +08:00
|
|
|
include "HexagonMapAsm2IntrinV65.gen.td"
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2012-04-13 01:55:53 +08:00
|
|
|
def HexagonInstrInfo : InstrInfo;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Hexagon processors supported.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2012-07-07 12:00:00 +08:00
|
|
|
class Proc<string Name, SchedMachineModel Model,
|
2011-12-13 05:14:40 +08:00
|
|
|
list<SubtargetFeature> Features>
|
2012-07-07 12:00:00 +08:00
|
|
|
: ProcessorModel<Name, Model, Features>;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2018-06-27 02:44:05 +08:00
|
|
|
def : Proc<"generic", HexagonModelV60,
|
2018-10-20 01:31:11 +08:00
|
|
|
[ArchV5, ArchV55, ArchV60,
|
2018-06-27 02:44:05 +08:00
|
|
|
FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
|
|
|
|
FeaturePackets, FeatureSmallData]>;
|
2018-10-20 01:31:11 +08:00
|
|
|
def : Proc<"hexagonv5", HexagonModelV5,
|
|
|
|
[ArchV5,
|
2018-05-15 04:41:04 +08:00
|
|
|
FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
|
2018-05-15 05:01:56 +08:00
|
|
|
FeaturePackets, FeatureSmallData]>;
|
2015-11-24 22:55:26 +08:00
|
|
|
def : Proc<"hexagonv55", HexagonModelV55,
|
2018-10-20 01:31:11 +08:00
|
|
|
[ArchV5, ArchV55,
|
2018-05-15 04:41:04 +08:00
|
|
|
FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
|
2018-05-15 05:01:56 +08:00
|
|
|
FeaturePackets, FeatureSmallData]>;
|
2015-11-24 22:55:26 +08:00
|
|
|
def : Proc<"hexagonv60", HexagonModelV60,
|
2018-10-20 01:31:11 +08:00
|
|
|
[ArchV5, ArchV55, ArchV60,
|
2018-05-15 04:41:04 +08:00
|
|
|
FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
|
2018-05-15 05:01:56 +08:00
|
|
|
FeaturePackets, FeatureSmallData]>;
|
2017-02-11 07:46:45 +08:00
|
|
|
def : Proc<"hexagonv62", HexagonModelV62,
|
2018-10-20 01:31:11 +08:00
|
|
|
[ArchV5, ArchV55, ArchV60, ArchV62,
|
2018-05-15 04:41:04 +08:00
|
|
|
FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
|
2018-05-15 05:01:56 +08:00
|
|
|
FeaturePackets, FeatureSmallData]>;
|
2017-12-12 02:57:54 +08:00
|
|
|
def : Proc<"hexagonv65", HexagonModelV65,
|
2018-10-20 01:31:11 +08:00
|
|
|
[ArchV5, ArchV55, ArchV60, ArchV62, ArchV65,
|
2018-05-15 04:09:07 +08:00
|
|
|
FeatureDuplex, FeatureMemNoShuf, FeatureMemops, FeatureNVJ,
|
2018-05-15 05:01:56 +08:00
|
|
|
FeatureNVS, FeaturePackets, FeatureSmallData]>;
|
2012-05-11 04:20:25 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Declare the target which we are implementing
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-12-31 16:18:23 +08:00
|
|
|
def HexagonAsmParser : AsmParser {
|
2016-04-22 03:49:53 +08:00
|
|
|
let ShouldEmitMatchRegisterAltName = 1;
|
2015-12-31 16:18:23 +08:00
|
|
|
bit HasMnemonicFirst = 0;
|
|
|
|
}
|
|
|
|
|
2015-11-09 12:07:48 +08:00
|
|
|
def HexagonAsmParserVariant : AsmParserVariant {
|
|
|
|
int Variant = 0;
|
2016-12-05 12:52:28 +08:00
|
|
|
string TokenizingCharacters = "#()=:.<>!+*-|^&";
|
2017-12-12 02:57:54 +08:00
|
|
|
string BreakCharacters = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
def HexagonAsmWriter : AsmWriter {
|
|
|
|
string AsmWriterClassName = "InstPrinter";
|
|
|
|
bit isMCAsmWriter = 1;
|
2015-11-09 12:07:48 +08:00
|
|
|
}
|
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
def Hexagon : Target {
|
|
|
|
let InstructionSet = HexagonInstrInfo;
|
2015-12-31 16:18:23 +08:00
|
|
|
let AssemblyParsers = [HexagonAsmParser];
|
2015-11-09 12:07:48 +08:00
|
|
|
let AssemblyParserVariants = [HexagonAsmParserVariant];
|
2017-12-12 02:57:54 +08:00
|
|
|
let AssemblyWriters = [HexagonAsmWriter];
|
[MachineOperand][Target] MachineOperand::isRenamable semantics changes
Summary:
Add a target option AllowRegisterRenaming that is used to opt in to
post-register-allocation renaming of registers. This is set to 0 by
default, which causes the hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq
fields of all opcodes to be set to 1, causing
MachineOperand::isRenamable to always return false.
Set the AllowRegisterRenaming flag to 1 for all in-tree targets that
have lit tests that were effected by enabling COPY forwarding in
MachineCopyPropagation (AArch64, AMDGPU, ARM, Hexagon, Mips, PowerPC,
RISCV, Sparc, SystemZ and X86).
Add some more comments describing the semantics of the
MachineOperand::isRenamable function and how it is set and maintained.
Change isRenamable to check the operand's opcode
hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq bit directly instead of
relying on it being consistently reflected in the IsRenamable bit
setting.
Clear the IsRenamable bit when changing an operand's register value.
Remove target code that was clearing the IsRenamable bit when changing
registers/opcodes now that this is done conservatively by default.
Change setting of hasExtraSrcRegAllocReq in AMDGPU target to be done in
one place covering all opcodes that have constant pipe read limit
restrictions.
Reviewers: qcolombet, MatzeB
Subscribers: aemerson, arsenm, jyknight, mcrosier, sdardis, nhaehnle, javed.absar, tpr, arichardson, kristof.beyls, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, sabuasal, niosHD, escha, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D43042
llvm-svn: 325931
2018-02-24 02:25:08 +08:00
|
|
|
let AllowRegisterRenaming = 1;
|
2011-12-13 05:14:40 +08:00
|
|
|
}
|