mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 08:29:43 +00:00
[Hexagon] Adding multiply with rnd/sat/rndsat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
839ff70c7e
commit
c3449d705b
@ -1783,6 +1783,52 @@ def M2_mpy_hh_s1: T_M2_mpy<0b11, 0, 0, 1, 0>;
|
||||
def M2_mpy_hh_s0: T_M2_mpy<0b11, 0, 0, 0, 0>;
|
||||
}
|
||||
|
||||
//Rd=mpyu(Rs.[H|L],Rt.[H|L])[:<<1]
|
||||
let isCodeGenOnly = 0 in {
|
||||
def M2_mpyu_ll_s1: T_M2_mpy<0b00, 0, 0, 1, 1>;
|
||||
def M2_mpyu_ll_s0: T_M2_mpy<0b00, 0, 0, 0, 1>;
|
||||
def M2_mpyu_lh_s1: T_M2_mpy<0b01, 0, 0, 1, 1>;
|
||||
def M2_mpyu_lh_s0: T_M2_mpy<0b01, 0, 0, 0, 1>;
|
||||
def M2_mpyu_hl_s1: T_M2_mpy<0b10, 0, 0, 1, 1>;
|
||||
def M2_mpyu_hl_s0: T_M2_mpy<0b10, 0, 0, 0, 1>;
|
||||
def M2_mpyu_hh_s1: T_M2_mpy<0b11, 0, 0, 1, 1>;
|
||||
def M2_mpyu_hh_s0: T_M2_mpy<0b11, 0, 0, 0, 1>;
|
||||
}
|
||||
|
||||
//Rd=mpy(Rs.[H|L],Rt.[H|L])[:<<1]:rnd
|
||||
let isCodeGenOnly = 0 in {
|
||||
def M2_mpy_rnd_ll_s1: T_M2_mpy <0b00, 0, 1, 1, 0>;
|
||||
def M2_mpy_rnd_ll_s0: T_M2_mpy <0b00, 0, 1, 0, 0>;
|
||||
def M2_mpy_rnd_lh_s1: T_M2_mpy <0b01, 0, 1, 1, 0>;
|
||||
def M2_mpy_rnd_lh_s0: T_M2_mpy <0b01, 0, 1, 0, 0>;
|
||||
def M2_mpy_rnd_hl_s1: T_M2_mpy <0b10, 0, 1, 1, 0>;
|
||||
def M2_mpy_rnd_hl_s0: T_M2_mpy <0b10, 0, 1, 0, 0>;
|
||||
def M2_mpy_rnd_hh_s1: T_M2_mpy <0b11, 0, 1, 1, 0>;
|
||||
def M2_mpy_rnd_hh_s0: T_M2_mpy <0b11, 0, 1, 0, 0>;
|
||||
}
|
||||
|
||||
//Rd=mpy(Rs.[H|L],Rt.[H|L])[:<<1][:sat]
|
||||
//Rd=mpy(Rs.[H|L],Rt.[H|L])[:<<1][:rnd][:sat]
|
||||
let Defs = [USR_OVF], isCodeGenOnly = 0 in {
|
||||
def M2_mpy_sat_ll_s1: T_M2_mpy <0b00, 1, 0, 1, 0>;
|
||||
def M2_mpy_sat_ll_s0: T_M2_mpy <0b00, 1, 0, 0, 0>;
|
||||
def M2_mpy_sat_lh_s1: T_M2_mpy <0b01, 1, 0, 1, 0>;
|
||||
def M2_mpy_sat_lh_s0: T_M2_mpy <0b01, 1, 0, 0, 0>;
|
||||
def M2_mpy_sat_hl_s1: T_M2_mpy <0b10, 1, 0, 1, 0>;
|
||||
def M2_mpy_sat_hl_s0: T_M2_mpy <0b10, 1, 0, 0, 0>;
|
||||
def M2_mpy_sat_hh_s1: T_M2_mpy <0b11, 1, 0, 1, 0>;
|
||||
def M2_mpy_sat_hh_s0: T_M2_mpy <0b11, 1, 0, 0, 0>;
|
||||
|
||||
def M2_mpy_sat_rnd_ll_s1: T_M2_mpy <0b00, 1, 1, 1, 0>;
|
||||
def M2_mpy_sat_rnd_ll_s0: T_M2_mpy <0b00, 1, 1, 0, 0>;
|
||||
def M2_mpy_sat_rnd_lh_s1: T_M2_mpy <0b01, 1, 1, 1, 0>;
|
||||
def M2_mpy_sat_rnd_lh_s0: T_M2_mpy <0b01, 1, 1, 0, 0>;
|
||||
def M2_mpy_sat_rnd_hl_s1: T_M2_mpy <0b10, 1, 1, 1, 0>;
|
||||
def M2_mpy_sat_rnd_hl_s0: T_M2_mpy <0b10, 1, 1, 0, 0>;
|
||||
def M2_mpy_sat_rnd_hh_s1: T_M2_mpy <0b11, 1, 1, 1, 0>;
|
||||
def M2_mpy_sat_rnd_hh_s0: T_M2_mpy <0b11, 1, 1, 0, 0>;
|
||||
}
|
||||
|
||||
// Multiply and use lower result.
|
||||
// Rd=+mpyi(Rs,#u8)
|
||||
let isExtendable = 1, opExtendable = 2, isExtentSigned = 0, opExtentBits = 8 in
|
||||
|
@ -8,3 +8,35 @@
|
||||
# CHECK: r17 = mpy(r21.h, r31.l):<<1
|
||||
0x71 0xdf 0x95 0xec
|
||||
# CHECK: r17 = mpy(r21.h, r31.h):<<1
|
||||
0x91 0xdf 0x95 0xec
|
||||
# CHECK: r17 = mpy(r21.l, r31.l):<<1:sat
|
||||
0xb1 0xdf 0x95 0xec
|
||||
# CHECK: r17 = mpy(r21.l, r31.h):<<1:sat
|
||||
0xd1 0xdf 0x95 0xec
|
||||
# CHECK: r17 = mpy(r21.h, r31.l):<<1:sat
|
||||
0xf1 0xdf 0x95 0xec
|
||||
# CHECK: r17 = mpy(r21.h, r31.h):<<1:sat
|
||||
0x11 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.l, r31.l):<<1:rnd
|
||||
0x31 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.l, r31.h):<<1:rnd
|
||||
0x51 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.h, r31.l):<<1:rnd
|
||||
0x71 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.h, r31.h):<<1:rnd
|
||||
0x91 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.l, r31.l):<<1:rnd:sat
|
||||
0xb1 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.l, r31.h):<<1:rnd:sat
|
||||
0xd1 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.h, r31.l):<<1:rnd:sat
|
||||
0xf1 0xdf 0xb5 0xec
|
||||
# CHECK: r17 = mpy(r21.h, r31.h):<<1:rnd:sat
|
||||
0x11 0xdf 0xd5 0xec
|
||||
# CHECK: r17 = mpyu(r21.l, r31.l):<<1
|
||||
0x31 0xdf 0xd5 0xec
|
||||
# CHECK: r17 = mpyu(r21.l, r31.h):<<1
|
||||
0x51 0xdf 0xd5 0xec
|
||||
# CHECK: r17 = mpyu(r21.h, r31.l):<<1
|
||||
0x71 0xdf 0xd5 0xec
|
||||
# CHECK: r17 = mpyu(r21.h, r31.h):<<1
|
||||
|
Loading…
Reference in New Issue
Block a user