diff --git a/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp b/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp index e020351e2aa..b72390edb56 100644 --- a/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp +++ b/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp @@ -417,46 +417,46 @@ void HexagonDisassembler::adjustExtendedInstructions(MCInst &MCI, // GP relative instruction in the absence of the corresponding immediate // extender. switch (MCI.getOpcode()) { - case Hexagon::S2_storerbabs: + case Hexagon::PS_storerbabs: opcode = Hexagon::S2_storerbgp; break; - case Hexagon::S2_storerhabs: + case Hexagon::PS_storerhabs: opcode = Hexagon::S2_storerhgp; break; - case Hexagon::S2_storerfabs: + case Hexagon::PS_storerfabs: opcode = Hexagon::S2_storerfgp; break; - case Hexagon::S2_storeriabs: + case Hexagon::PS_storeriabs: opcode = Hexagon::S2_storerigp; break; - case Hexagon::S2_storerbnewabs: + case Hexagon::PS_storerbnewabs: opcode = Hexagon::S2_storerbnewgp; break; - case Hexagon::S2_storerhnewabs: + case Hexagon::PS_storerhnewabs: opcode = Hexagon::S2_storerhnewgp; break; - case Hexagon::S2_storerinewabs: + case Hexagon::PS_storerinewabs: opcode = Hexagon::S2_storerinewgp; break; - case Hexagon::S2_storerdabs: + case Hexagon::PS_storerdabs: opcode = Hexagon::S2_storerdgp; break; - case Hexagon::L4_loadrb_abs: + case Hexagon::PS_loadrbabs: opcode = Hexagon::L2_loadrbgp; break; - case Hexagon::L4_loadrub_abs: + case Hexagon::PS_loadrubabs: opcode = Hexagon::L2_loadrubgp; break; - case Hexagon::L4_loadrh_abs: + case Hexagon::PS_loadrhabs: opcode = Hexagon::L2_loadrhgp; break; - case Hexagon::L4_loadruh_abs: + case Hexagon::PS_loadruhabs: opcode = Hexagon::L2_loadruhgp; break; - case Hexagon::L4_loadri_abs: + case Hexagon::PS_loadriabs: opcode = Hexagon::L2_loadrigp; break; - case Hexagon::L4_loadrd_abs: + case Hexagon::PS_loadrdabs: opcode = Hexagon::L2_loadrdgp; break; default: @@ -811,20 +811,20 @@ static const unsigned int StoreConditionalOpcodeData[][2] = { // HexagonII::INST_ICLASS_LD // HexagonII::INST_ICLASS_LD_ST_2 -static unsigned int LoadStoreOpcodeData[][2] = {{L4_loadrd_abs, 0x49c00000}, - {L4_loadri_abs, 0x49800000}, - {L4_loadruh_abs, 0x49600000}, - {L4_loadrh_abs, 0x49400000}, - {L4_loadrub_abs, 0x49200000}, - {L4_loadrb_abs, 0x49000000}, - {S2_storerdabs, 0x48c00000}, - {S2_storerinewabs, 0x48a01000}, - {S2_storerhnewabs, 0x48a00800}, - {S2_storerbnewabs, 0x48a00000}, - {S2_storeriabs, 0x48800000}, - {S2_storerfabs, 0x48600000}, - {S2_storerhabs, 0x48400000}, - {S2_storerbabs, 0x48000000}}; +static unsigned int LoadStoreOpcodeData[][2] = {{PS_loadrdabs, 0x49c00000}, + {PS_loadriabs, 0x49800000}, + {PS_loadruhabs, 0x49600000}, + {PS_loadrhabs, 0x49400000}, + {PS_loadrubabs, 0x49200000}, + {PS_loadrbabs, 0x49000000}, + {PS_storerdabs, 0x48c00000}, + {PS_storerinewabs, 0x48a01000}, + {PS_storerhnewabs, 0x48a00800}, + {PS_storerbnewabs, 0x48a00000}, + {PS_storeriabs, 0x48800000}, + {PS_storerfabs, 0x48600000}, + {PS_storerhabs, 0x48400000}, + {PS_storerbabs, 0x48000000}}; static const size_t NumCondS = array_lengthof(StoreConditionalOpcodeData); static const size_t NumLS = array_lengthof(LoadStoreOpcodeData); @@ -982,15 +982,15 @@ static DecodeStatus decodeSpecial(MCInst &MI, uint32_t insn) { break; // op: g16_2 - case (Hexagon::L4_loadri_abs): + case (Hexagon::PS_loadriabs): ++shift; // op: g16_1 - case Hexagon::L4_loadrh_abs: - case Hexagon::L4_loadruh_abs: + case Hexagon::PS_loadrhabs: + case Hexagon::PS_loadruhabs: ++shift; // op: g16_0 - case Hexagon::L4_loadrb_abs: - case Hexagon::L4_loadrub_abs: { + case Hexagon::PS_loadrbabs: + case Hexagon::PS_loadrubabs: { // op: Rd Value |= insn & UINT64_C(31); DecodeIntRegsRegisterClass(MI, Value, 0, 0); @@ -1001,7 +1001,7 @@ static DecodeStatus decodeSpecial(MCInst &MI, uint32_t insn) { break; } - case Hexagon::L4_loadrd_abs: { + case Hexagon::PS_loadrdabs: { Value = insn & UINT64_C(31); DecodeDoubleRegsRegisterClass(MI, Value, 0, 0); Value = (insn >> 11) & UINT64_C(49152); @@ -1011,7 +1011,7 @@ static DecodeStatus decodeSpecial(MCInst &MI, uint32_t insn) { break; } - case Hexagon::S2_storerdabs: { + case Hexagon::PS_storerdabs: { // op: g16_3 Value = (insn >> 11) & UINT64_C(49152); Value |= (insn >> 7) & UINT64_C(15872); @@ -1025,13 +1025,13 @@ static DecodeStatus decodeSpecial(MCInst &MI, uint32_t insn) { } // op: g16_2 - case Hexagon::S2_storerinewabs: + case Hexagon::PS_storerinewabs: ++shift; // op: g16_1 - case Hexagon::S2_storerhnewabs: + case Hexagon::PS_storerhnewabs: ++shift; // op: g16_0 - case Hexagon::S2_storerbnewabs: { + case Hexagon::PS_storerbnewabs: { Value = (insn >> 11) & UINT64_C(49152); Value |= (insn >> 7) & UINT64_C(15872); Value |= (insn >> 5) & UINT64_C(256); @@ -1044,14 +1044,14 @@ static DecodeStatus decodeSpecial(MCInst &MI, uint32_t insn) { } // op: g16_2 - case Hexagon::S2_storeriabs: + case Hexagon::PS_storeriabs: ++shift; // op: g16_1 - case Hexagon::S2_storerhabs: - case Hexagon::S2_storerfabs: + case Hexagon::PS_storerhabs: + case Hexagon::PS_storerfabs: ++shift; // op: g16_0 - case Hexagon::S2_storerbabs: { + case Hexagon::PS_storerbabs: { Value = (insn >> 11) & UINT64_C(49152); Value |= (insn >> 7) & UINT64_C(15872); Value |= (insn >> 5) & UINT64_C(256); diff --git a/lib/Target/Hexagon/HexagonBitTracker.cpp b/lib/Target/Hexagon/HexagonBitTracker.cpp index 4ac24385d1e..ff3831736f2 100644 --- a/lib/Target/Hexagon/HexagonBitTracker.cpp +++ b/lib/Target/Hexagon/HexagonBitTracker.cpp @@ -999,7 +999,7 @@ bool HexagonEvaluator::evaluateLoad(const MachineInstr &MI, case L2_loadrb_pci: case L2_loadrb_pcr: case L2_loadrb_pi: - case L4_loadrb_abs: + case PS_loadrbabs: case L4_loadrb_ap: case L4_loadrb_rr: case L4_loadrb_ur: @@ -1013,7 +1013,7 @@ bool HexagonEvaluator::evaluateLoad(const MachineInstr &MI, case L2_loadrub_pci: case L2_loadrub_pcr: case L2_loadrub_pi: - case L4_loadrub_abs: + case PS_loadrubabs: case L4_loadrub_ap: case L4_loadrub_rr: case L4_loadrub_ur: @@ -1027,7 +1027,7 @@ bool HexagonEvaluator::evaluateLoad(const MachineInstr &MI, case L2_loadrh_pci: case L2_loadrh_pcr: case L2_loadrh_pi: - case L4_loadrh_abs: + case PS_loadrhabs: case L4_loadrh_ap: case L4_loadrh_rr: case L4_loadrh_ur: @@ -1042,7 +1042,7 @@ bool HexagonEvaluator::evaluateLoad(const MachineInstr &MI, case L2_loadruh_pcr: case L2_loadruh_pi: case L4_loadruh_rr: - case L4_loadruh_abs: + case PS_loadruhabs: case L4_loadruh_ap: case L4_loadruh_ur: BitNum = 16; @@ -1056,7 +1056,7 @@ bool HexagonEvaluator::evaluateLoad(const MachineInstr &MI, case L2_loadri_pcr: case L2_loadri_pi: case L2_loadw_locked: - case L4_loadri_abs: + case PS_loadriabs: case L4_loadri_ap: case L4_loadri_rr: case L4_loadri_ur: @@ -1072,7 +1072,7 @@ bool HexagonEvaluator::evaluateLoad(const MachineInstr &MI, case L2_loadrd_pcr: case L2_loadrd_pi: case L4_loadd_locked: - case L4_loadrd_abs: + case PS_loadrdabs: case L4_loadrd_ap: case L4_loadrd_rr: case L4_loadrd_ur: diff --git a/lib/Target/Hexagon/HexagonInstrInfoV4.td b/lib/Target/Hexagon/HexagonInstrInfoV4.td index 263e55a59a6..918a6c387c9 100644 --- a/lib/Target/Hexagon/HexagonInstrInfoV4.td +++ b/lib/Target/Hexagon/HexagonInstrInfoV4.td @@ -3534,7 +3534,7 @@ multiclass ST_Abs MajOp, bit isHalf = 0> { let CextOpcode = CextOp, BaseOpcode = CextOp#_abs in { let opExtendable = 0, isPredicable = 1 in - def S2_#NAME#abs : T_StoreAbs ; + def PS_#NAME#abs : T_StoreAbs ; // Predicated def S4_p#NAME#t_abs : T_StoreAbs_Pred; @@ -3636,7 +3636,7 @@ multiclass ST_Abs_NV MajOp> { let CextOpcode = CextOp, BaseOpcode = CextOp#_abs in { let opExtendable = 0, isPredicable = 1 in - def S2_#NAME#newabs : T_StoreAbs_NV ; + def PS_#NAME#newabs : T_StoreAbs_NV ; // Predicated def S4_p#NAME#newt_abs : T_StoreAbs_NV_Pred ; @@ -3733,14 +3733,14 @@ class Stoream_pat; let AddedComplexity = 30 in { - def: Storea_pat; - def: Storea_pat; - def: Storea_pat; - def: Storea_pat; + def: Storea_pat; + def: Storea_pat; + def: Storea_pat; + def: Storea_pat; - def: Stoream_pat; - def: Stoream_pat; - def: Stoream_pat; + def: Stoream_pat; + def: Stoream_pat; + def: Stoream_pat; } def: Storea_pat, I32, addrgp, S2_storerbgp>; @@ -3856,7 +3856,7 @@ multiclass LD_Abs MajOp> { let CextOpcode = CextOp, BaseOpcode = CextOp#_abs in { let opExtendable = 1, isPredicable = 1 in - def L4_#NAME#_abs: T_LoadAbs ; + def PS_#NAME#abs: T_LoadAbs ; // Predicated defm L4_p#NAME#t : LD_Abs_Pred; @@ -3885,20 +3885,20 @@ class LoadAbs_pats (VT (MI tglobaladdr:$absaddr))>; let AddedComplexity = 30 in { - def: LoadAbs_pats ; - def: LoadAbs_pats ; - def: LoadAbs_pats ; - def: LoadAbs_pats ; - def: LoadAbs_pats ; - def: LoadAbs_pats ; - def: LoadAbs_pats ; - def: LoadAbs_pats ; - def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; + def: LoadAbs_pats ; } let AddedComplexity = 30 in def: Pat<(i64 (zextloadi1 (HexagonCONST32 tglobaladdr:$absaddr))), - (Zext64 (L4_loadrub_abs tglobaladdr:$absaddr))>; + (Zext64 (PS_loadrubabs tglobaladdr:$absaddr))>; //===----------------------------------------------------------------------===// // multiclass for load instructions with GP-relative addressing mode. @@ -3936,10 +3936,10 @@ def: Loada_pat; def: Loada_pat; // Map from Pd = load(globaladdress) -> Rd = memb(globaladdress), Pd = Rd -def: Loadam_pat; +def: Loadam_pat; def: Loadam_pat; -def: Stoream_pat; +def: Stoream_pat; def: Stoream_pat; // Map from load(globaladdress) -> mem[u][bhwd](#foo) @@ -3972,17 +3972,17 @@ def: Pat<(HexagonCONST32_GP tblockaddress:$Rs), (A2_tfrsi s16Ext:$Rs)>; def: Pat<(HexagonCONST32_GP tglobaladdr:$Rs), (A2_tfrsi s16Ext:$Rs)>; let AddedComplexity = 30 in { - def: Storea_pat; - def: Storea_pat; - def: Storea_pat; + def: Storea_pat; + def: Storea_pat; + def: Storea_pat; } let AddedComplexity = 30 in { - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; } // Indexed store word - global address. @@ -3992,74 +3992,74 @@ defm: Storex_add_pat; // Load from a global address that has only one use in the current basic block. let AddedComplexity = 100 in { - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; } // Store to a global address that has only one use in the current basic block. let AddedComplexity = 100 in { - def: Storea_pat; - def: Storea_pat; - def: Storea_pat; - def: Storea_pat; + def: Storea_pat; + def: Storea_pat; + def: Storea_pat; + def: Storea_pat; - def: Stoream_pat; + def: Stoream_pat; } // i8/i16/i32 -> i64 loads // We need a complexity of 120 here to override preceding handling of // zextload. let AddedComplexity = 120 in { - def: Loadam_pat; - def: Loadam_pat; - def: Loadam_pat; + def: Loadam_pat; + def: Loadam_pat; + def: Loadam_pat; - def: Loadam_pat; - def: Loadam_pat; - def: Loadam_pat; + def: Loadam_pat; + def: Loadam_pat; + def: Loadam_pat; - def: Loadam_pat; - def: Loadam_pat; - def: Loadam_pat; + def: Loadam_pat; + def: Loadam_pat; + def: Loadam_pat; } let AddedComplexity = 100 in { - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; } let AddedComplexity = 100 in { - def: Storea_pat; - def: Storea_pat; - def: Storea_pat; - def: Storea_pat; + def: Storea_pat; + def: Storea_pat; + def: Storea_pat; + def: Storea_pat; } -def: Loada_pat; -def: Loada_pat; -def: Loada_pat; -def: Loada_pat; +def: Loada_pat; +def: Loada_pat; +def: Loada_pat; +def: Loada_pat; -def: Storea_pat, I32, addrgp, S2_storerbabs>; -def: Storea_pat, I32, addrgp, S2_storerhabs>; -def: Storea_pat, I32, addrgp, S2_storeriabs>; -def: Storea_pat, I64, addrgp, S2_storerdabs>; +def: Storea_pat, I32, addrgp, PS_storerbabs>; +def: Storea_pat, I32, addrgp, PS_storerhabs>; +def: Storea_pat, I32, addrgp, PS_storeriabs>; +def: Storea_pat, I64, addrgp, PS_storerdabs>; let Constraints = "@earlyclobber $dst" in def Insert4 : PseudoM<(outs DoubleRegs:$dst), (ins IntRegs:$a, IntRegs:$b, diff --git a/lib/Target/Hexagon/HexagonInstrInfoV5.td b/lib/Target/Hexagon/HexagonInstrInfoV5.td index 599a6cb97cd..cdd66633618 100644 --- a/lib/Target/Hexagon/HexagonInstrInfoV5.td +++ b/lib/Target/Hexagon/HexagonInstrInfoV5.td @@ -118,9 +118,9 @@ let AddedComplexity = 20 in { } let AddedComplexity = 80 in { - def: Loada_pat; - def: Loada_pat; - def: Loada_pat; + def: Loada_pat; + def: Loada_pat; + def: Loada_pat; } let AddedComplexity = 100 in { @@ -153,8 +153,8 @@ let AddedComplexity = 20 in { } let AddedComplexity = 80 in { - def: Storea_pat; - def: Storea_pat; + def: Storea_pat; + def: Storea_pat; } let AddedComplexity = 100 in {