diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /lib/Target/Mips/Mips16InstrInfo.td | |
parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
download | src-eb11fae6d08f479c0799db45860a98af528fa6e7.tar.gz src-eb11fae6d08f479c0799db45860a98af528fa6e7.zip |
Vendor import of llvm trunk r338150:vendor/llvm/llvm-trunk-r338150
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=336809
svn path=/vendor/llvm/llvm-trunk-r338150/; revision=336814; tag=vendor/llvm/llvm-trunk-r338150
Diffstat (limited to 'lib/Target/Mips/Mips16InstrInfo.td')
-rw-r--r-- | lib/Target/Mips/Mips16InstrInfo.td | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/Target/Mips/Mips16InstrInfo.td b/lib/Target/Mips/Mips16InstrInfo.td index b91c94288582..b7a1b9ce41bf 100644 --- a/lib/Target/Mips/Mips16InstrInfo.td +++ b/lib/Target/Mips/Mips16InstrInfo.td @@ -869,7 +869,9 @@ def Move32R16: FI8_MOV32R16_ins<"move", IIM16Alu>; //Purpose: Move // To move the contents of a GPR to a GPR. // -def MoveR3216: FI8_MOVR3216_ins<"move", IIM16Alu>; +def MoveR3216: FI8_MOVR3216_ins<"move", IIM16Alu> { + let isMoveReg = 1; +} // // Format: MFHI rx MIPS16e @@ -879,6 +881,7 @@ def MoveR3216: FI8_MOVR3216_ins<"move", IIM16Alu>; def Mfhi16: FRR16_M_ins<0b10000, "mfhi", IIM16Alu> { let Uses = [HI0]; let hasSideEffects = 0; + let isMoveReg = 1; } // @@ -889,6 +892,7 @@ def Mfhi16: FRR16_M_ins<0b10000, "mfhi", IIM16Alu> { def Mflo16: FRR16_M_ins<0b10010, "mflo", IIM16Alu> { let Uses = [LO0]; let hasSideEffects = 0; + let isMoveReg = 0; } // @@ -1403,14 +1407,6 @@ def: Mips16Pat<(i32 addr16sp:$addr), (AddiuRxRyOffMemX16 addr16sp:$addr)>; // Large (>16 bit) immediate loads def : Mips16Pat<(i32 imm:$imm), (LwConstant32 imm:$imm, -1)>; -// Carry MipsPatterns -def : Mips16Pat<(subc CPU16Regs:$lhs, CPU16Regs:$rhs), - (SubuRxRyRz16 CPU16Regs:$lhs, CPU16Regs:$rhs)>; -def : Mips16Pat<(addc CPU16Regs:$lhs, CPU16Regs:$rhs), - (AdduRxRyRz16 CPU16Regs:$lhs, CPU16Regs:$rhs)>; -def : Mips16Pat<(addc CPU16Regs:$src, immSExt16:$imm), - (AddiuRxRxImmX16 CPU16Regs:$src, imm:$imm)>; - // // Some branch conditional patterns are not generated by llvm at this time. // Some are for seemingly arbitrary reasons not used: i.e. with signed number @@ -1424,7 +1420,7 @@ def : Mips16Pat<(addc CPU16Regs:$src, immSExt16:$imm), // setcc instead and earlier I had implemented setcc first so may have masked // the problem. The setcc variants are suboptimal for mips16 so I may wantto // figure out how to enable the brcond patterns or else possibly new -// combinations of of brcond and setcc. +// combinations of brcond and setcc. // // // bcond-seteq @@ -1862,11 +1858,12 @@ def : Mips16Pat<(MipsHi tglobaladdr:$in), (SllX16 (LiRxImmX16 tglobaladdr:$in), 16)>; def : Mips16Pat<(MipsHi tjumptable:$in), (SllX16 (LiRxImmX16 tjumptable:$in), 16)>; -def : Mips16Pat<(MipsHi tglobaltlsaddr:$in), - (SllX16 (LiRxImmX16 tglobaltlsaddr:$in), 16)>; def : Mips16Pat<(MipsLo tblockaddress:$in), (LiRxImmX16 tblockaddress:$in)>; +def : Mips16Pat<(MipsTlsHi tglobaltlsaddr:$in), + (SllX16 (LiRxImmX16 tglobaltlsaddr:$in), 16)>; + // wrapper_pic class Wrapper16Pat<SDNode node, Instruction ADDiuOp, RegisterClass RC>: Mips16Pat<(MipsWrapper RC:$gp, node:$in), @@ -1910,3 +1907,7 @@ def CONSTPOOL_ENTRY : MipsPseudo16<(outs), (ins cpinst_operand:$instid, cpinst_operand:$cpidx, i32imm:$size), "foo", []>; +// Instruction Aliases + +let EncodingPredicates = [InMips16Mode] in +def : MipsInstAlias<"nop", (Move32R16 ZERO, S0)>; |