forked from OSchip/llvm-project
[Hexagon] Adding round reg/imm and bitsplit instructions.
llvm-svn: 225188
This commit is contained in:
parent
51477ad1a0
commit
5e079577e1
|
@ -3221,6 +3221,13 @@ class T_S2op_2 <string mnemonic, bits<4> RegTyBits, RegisterClass RCOut,
|
||||||
let Inst{4-0} = dst;
|
let Inst{4-0} = dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class T_S2op_2_di <string mnemonic, bits<3> MajOp, bits<3> MinOp>
|
||||||
|
: T_S2op_2 <mnemonic, 0b1000, DoubleRegs, IntRegs, MajOp, MinOp, 0, 0>;
|
||||||
|
|
||||||
|
let hasNewValue = 1 in
|
||||||
|
class T_S2op_2_id <string mnemonic, bits<3> MajOp, bits<3> MinOp>
|
||||||
|
: T_S2op_2 <mnemonic, 0b1000, IntRegs, DoubleRegs, MajOp, MinOp, 0, 0>;
|
||||||
|
|
||||||
let hasNewValue = 1 in
|
let hasNewValue = 1 in
|
||||||
class T_S2op_2_ii <string mnemonic, bits<3> MajOp, bits<3> MinOp,
|
class T_S2op_2_ii <string mnemonic, bits<3> MajOp, bits<3> MinOp,
|
||||||
bit isSat = 0, bit isRnd = 0, list<dag> pattern = []>
|
bit isSat = 0, bit isRnd = 0, list<dag> pattern = []>
|
||||||
|
|
|
@ -1748,6 +1748,20 @@ def M4_xor_xacc
|
||||||
let Inst{4-0} = Rxx;
|
let Inst{4-0} = Rxx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Split bitfield
|
||||||
|
let isCodeGenOnly = 0 in
|
||||||
|
def A4_bitspliti : T_S2op_2_di <"bitsplit", 0b110, 0b100>;
|
||||||
|
|
||||||
|
// Arithmetic/Convergent round
|
||||||
|
let isCodeGenOnly = 0 in
|
||||||
|
def A4_cround_ri : T_S2op_2_ii <"cround", 0b111, 0b000>;
|
||||||
|
|
||||||
|
let isCodeGenOnly = 0 in
|
||||||
|
def A4_round_ri : T_S2op_2_ii <"round", 0b111, 0b100>;
|
||||||
|
|
||||||
|
let Defs = [USR_OVF], isCodeGenOnly = 0 in
|
||||||
|
def A4_round_ri_sat : T_S2op_2_ii <"round", 0b111, 0b110, 1>;
|
||||||
|
|
||||||
// Add and accumulate.
|
// Add and accumulate.
|
||||||
// Rd=add(Rs,add(Ru,#s6))
|
// Rd=add(Rs,add(Ru,#s6))
|
||||||
let isExtendable = 1, opExtendable = 3, isExtentSigned = 1, opExtentBits = 6,
|
let isExtendable = 1, opExtendable = 3, isExtentSigned = 1, opExtentBits = 6,
|
||||||
|
|
|
@ -86,6 +86,12 @@
|
||||||
# CHECK: r17:16 = neg(r21:20)
|
# CHECK: r17:16 = neg(r21:20)
|
||||||
0xd1 0xc0 0x95 0x8c
|
0xd1 0xc0 0x95 0x8c
|
||||||
# CHECK: r17 = neg(r21):sat
|
# CHECK: r17 = neg(r21):sat
|
||||||
|
0x11 0xdf 0xf5 0x8c
|
||||||
|
# CHECK: r17 = cround(r21, #31)
|
||||||
|
0x91 0xdf 0xf5 0x8c
|
||||||
|
# CHECK: r17 = round(r21, #31)
|
||||||
|
0xd1 0xdf 0xf5 0x8c
|
||||||
|
# CHECK: r17 = round(r21, #31):sat
|
||||||
0x71 0xd5 0x1f 0xef
|
0x71 0xd5 0x1f 0xef
|
||||||
# CHECK: r17 += sub(r21, r31)
|
# CHECK: r17 += sub(r21, r31)
|
||||||
0x11 0xd5 0x3f 0xd5
|
0x11 0xd5 0x3f 0xd5
|
||||||
|
|
|
@ -64,6 +64,8 @@
|
||||||
# CHECK: r17 = clrbit(r21, r31)
|
# CHECK: r17 = clrbit(r21, r31)
|
||||||
0x91 0xdf 0x95 0xc6
|
0x91 0xdf 0x95 0xc6
|
||||||
# CHECK: r17 = togglebit(r21, r31)
|
# CHECK: r17 = togglebit(r21, r31)
|
||||||
|
0x90 0xdf 0xd5 0x88
|
||||||
|
# CHECK: r17:16 = bitsplit(r21, #31)
|
||||||
0xf1 0xcd 0x15 0x87
|
0xf1 0xcd 0x15 0x87
|
||||||
# CHECK: r17 = tableidxb(r21, #7, #13):raw
|
# CHECK: r17 = tableidxb(r21, #7, #13):raw
|
||||||
0xf1 0xcd 0x55 0x87
|
0xf1 0xcd 0x55 0x87
|
||||||
|
|
Loading…
Reference in New Issue