forked from OSchip/llvm-project
R600/SI: Add instruction definitions for more LDS ops
llvm-svn: 210675
This commit is contained in:
parent
7ddcd83d49
commit
8c6613d2bf
|
@ -481,6 +481,7 @@ class DS_Store2_Helper <bits<8> op, string asm, RegisterClass regClass> : DS_1A
|
|||
let vdst = 0;
|
||||
}
|
||||
|
||||
// 1 address, 1 data.
|
||||
class DS_1A1D_RET <bits<8> op, string asm, RegisterClass rc> : DS_1A <
|
||||
op,
|
||||
(outs rc:$vdst),
|
||||
|
@ -493,6 +494,67 @@ class DS_1A1D_RET <bits<8> op, string asm, RegisterClass rc> : DS_1A <
|
|||
let mayLoad = 1;
|
||||
}
|
||||
|
||||
// 1 address, 0 data.
|
||||
class DS_1A0D_RET <bits<8> op, string asm, RegisterClass rc> : DS_1A <
|
||||
op,
|
||||
(outs rc:$vdst),
|
||||
(ins i1imm:$gds, VReg_32:$addr, u16imm:$offset),
|
||||
asm#" $vdst, $addr, $offset, [M0]",
|
||||
[]> {
|
||||
let data0 = 0;
|
||||
let data1 = 0;
|
||||
let mayStore = 1;
|
||||
let mayLoad = 1;
|
||||
}
|
||||
|
||||
// 1 address, 0 data.
|
||||
class DS_1A0D_NORET <bits<8> op, string asm, RegisterClass rc> : DS_1A <
|
||||
op,
|
||||
(outs ),
|
||||
(ins i1imm:$gds, VReg_32:$addr, u16imm:$offset),
|
||||
asm#" $addr, $offset, [M0]",
|
||||
[]> {
|
||||
let data0 = 0;
|
||||
let data1 = 0;
|
||||
let mayStore = 1;
|
||||
let mayLoad = 1;
|
||||
}
|
||||
|
||||
// 1 address, 2 data.
|
||||
class DS_1A2D_RET <bits<8> op, string asm, RegisterClass rc> : DS_1A <
|
||||
op,
|
||||
(outs rc:$vdst),
|
||||
(ins i1imm:$gds, VReg_32:$addr, VReg_32:$data0, VReg_32:$data1, u16imm:$offset),
|
||||
asm#" $vdst, $addr, $data0, $data1, $offset, [M0]",
|
||||
[]> {
|
||||
let mayStore = 1;
|
||||
let mayLoad = 1;
|
||||
}
|
||||
|
||||
// 1 address, 2 data.
|
||||
class DS_1A2D_NORET <bits<8> op, string asm, RegisterClass rc> : DS_1A <
|
||||
op,
|
||||
(outs),
|
||||
(ins i1imm:$gds, VReg_32:$addr, VReg_32:$data0, VReg_32:$data1, u16imm:$offset),
|
||||
asm#" $addr, $data0, $data1, $offset, [M0]",
|
||||
[]> {
|
||||
let mayStore = 1;
|
||||
let mayLoad = 1;
|
||||
}
|
||||
|
||||
// 1 address, 1 data.
|
||||
class DS_1A1D_NORET <bits<8> op, string asm, RegisterClass rc> : DS_1A <
|
||||
op,
|
||||
(outs),
|
||||
(ins i1imm:$gds, VReg_32:$addr, VReg_32:$data0, u16imm:$offset),
|
||||
asm#" $addr, $data0, $offset, [M0]",
|
||||
[]> {
|
||||
|
||||
let data1 = 0;
|
||||
let mayStore = 1;
|
||||
let mayLoad = 1;
|
||||
}
|
||||
|
||||
class MTBUF_Store_Helper <bits<3> op, string asm, RegisterClass regClass> : MTBUF <
|
||||
op,
|
||||
(outs),
|
||||
|
|
|
@ -713,8 +713,50 @@ defm V_CMPX_CLASS_F64 : VOPC_64 <0x000000b8, "V_CMPX_CLASS_F64">;
|
|||
// DS Instructions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
||||
def DS_ADD_U32 : DS_1A1D_NORET <0x0, "DS_ADD_U32", VReg_32>;
|
||||
def DS_SUB_U32 : DS_1A1D_NORET <0x1, "DS_SUB_U32", VReg_32>;
|
||||
def DS_RSUB_U32 : DS_1A1D_NORET <0x2, "DS_RSUB_U32", VReg_32>;
|
||||
def DS_INC_U32 : DS_1A0D_NORET <0x3, "DS_INC_U32", VReg_32>;
|
||||
def DS_DEC_U32 : DS_1A0D_NORET <0x4, "DS_DEC_U32", VReg_32>;
|
||||
def DS_MIN_I32 : DS_1A1D_NORET <0x5, "DS_MIN_I32", VReg_32>;
|
||||
def DS_MAX_I32 : DS_1A1D_NORET <0x6, "DS_MAX_I32", VReg_32>;
|
||||
def DS_MIN_U32 : DS_1A1D_NORET <0x7, "DS_MIN_U32", VReg_32>;
|
||||
def DS_MAX_U32 : DS_1A1D_NORET <0x8, "DS_MAX_U32", VReg_32>;
|
||||
def DS_AND_B32 : DS_1A1D_NORET <0x9, "DS_AND_B32", VReg_32>;
|
||||
def DS_OR_B32 : DS_1A1D_NORET <0xa, "DS_OR_B32", VReg_32>;
|
||||
def DS_XOR_B32 : DS_1A1D_NORET <0xb, "DS_XOR_B32", VReg_32>;
|
||||
def DS_MSKOR_B32 : DS_1A1D_NORET <0xc, "DS_MSKOR_B32", VReg_32>;
|
||||
def DS_CMPST_B32 : DS_1A2D_NORET <0x10, "DS_CMPST_B32", VReg_32>;
|
||||
def DS_CMPST_F32 : DS_1A2D_NORET <0x11, "DS_CMPST_F32", VReg_32>;
|
||||
def DS_MIN_F32 : DS_1A1D_NORET <0x12, "DS_MIN_F32", VReg_32>;
|
||||
def DS_MAX_F32 : DS_1A1D_NORET <0x13, "DS_MAX_F32", VReg_32>;
|
||||
|
||||
def DS_ADD_RTN_U32 : DS_1A1D_RET <0x20, "DS_ADD_RTN_U32", VReg_32>;
|
||||
def DS_SUB_RTN_U32 : DS_1A1D_RET <0x21, "DS_SUB_RTN_U32", VReg_32>;
|
||||
def DS_RSUB_RTN_U32 : DS_1A1D_RET <0x22, "DS_RSUB_RTN_U32", VReg_32>;
|
||||
def DS_INC_RTN_U32 : DS_1A0D_RET <0x23, "DS_INC_RTN_U32", VReg_32>;
|
||||
def DS_DEC_RTN_U32 : DS_1A0D_RET <0x24, "DS_DEC_RTN_U32", VReg_32>;
|
||||
def DS_MIN_RTN_I32 : DS_1A1D_RET <0x25, "DS_MIN_RTN_I32", VReg_32>;
|
||||
def DS_MAX_RTN_I32 : DS_1A1D_RET <0x26, "DS_MAX_RTN_I32", VReg_32>;
|
||||
def DS_MIN_RTN_U32 : DS_1A1D_RET <0x27, "DS_MIN_RTN_U32", VReg_32>;
|
||||
def DS_MAX_RTN_U32 : DS_1A1D_RET <0x28, "DS_MAX_RTN_U32", VReg_32>;
|
||||
def DS_AND_RTN_B32 : DS_1A1D_RET <0x29, "DS_AND_RTN_B32", VReg_32>;
|
||||
def DS_OR_RTN_B32 : DS_1A1D_RET <0x2a, "DS_OR_RTN_B32", VReg_32>;
|
||||
def DS_XOR_RTN_B32 : DS_1A1D_RET <0x2b, "DS_XOR_RTN_B32", VReg_32>;
|
||||
def DS_MSKOR_RTN_B32 : DS_1A1D_RET <0x2c, "DS_MSKOR_RTN_B32", VReg_32>;
|
||||
def DS_WRXCHG_RTN_B32 : DS_1A1D_RET <0x2d, "DS_WRXCHG_RTN_B32", VReg_32>;
|
||||
//def DS_WRXCHG2_RTN_B32 : DS_2A0D_RET <0x2e, "DS_WRXCHG2_RTN_B32", VReg_32>;
|
||||
//def DS_WRXCHG2ST64_RTN_B32 : DS_2A0D_RET <0x2f, "DS_WRXCHG2_RTN_B32", VReg_32>;
|
||||
def DS_CMPST_RTN_B32 : DS_1A2D_RET <0x30, "DS_CMPST_RTN_B32", VReg_32>;
|
||||
def DS_CMPST_RTN_F32 : DS_1A2D_RET <0x31, "DS_CMPST_RTN_F32", VReg_32>;
|
||||
def DS_MIN_RTN_F32 : DS_1A1D_RET <0x32, "DS_MIN_RTN_F32", VReg_32>;
|
||||
def DS_MAX_RTN_F32 : DS_1A1D_RET <0x33, "DS_MAX_RTN_F32", VReg_32>;
|
||||
|
||||
let SubtargetPredicate = isCI in {
|
||||
def DS_WRAP_RTN_F32 : DS_1A1D_RET <0x34, "DS_WRAP_RTN_F32", VReg_32>;
|
||||
} // End isCI
|
||||
|
||||
def DS_WRITE_B32 : DS_Store_Helper <0x0000000d, "DS_WRITE_B32", VReg_32>;
|
||||
def DS_WRITE_B8 : DS_Store_Helper <0x00000001e, "DS_WRITE_B8", VReg_32>;
|
||||
def DS_WRITE_B16 : DS_Store_Helper <0x00000001f, "DS_WRITE_B16", VReg_32>;
|
||||
|
|
Loading…
Reference in New Issue