mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
R600/SI: enable all S_LOAD and S_BUFFER_LOAD opcodes
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae621a2bc9
commit
13e876b27b
@ -115,16 +115,17 @@ class SOPK_64 <bits<5> op, string opName, list<dag> pattern> : SOPK <
|
||||
opName#" $dst, $src0", pattern
|
||||
>;
|
||||
|
||||
multiclass SMRD_Helper <bits<5> op, string asm, RegisterClass dstClass> {
|
||||
multiclass SMRD_Helper <bits<5> op, string asm, RegisterClass baseClass,
|
||||
RegisterClass dstClass> {
|
||||
def _IMM : SMRD <
|
||||
op, 1, (outs dstClass:$dst),
|
||||
(ins SReg_64:$sbase, i32imm:$offset),
|
||||
(ins baseClass:$sbase, i32imm:$offset),
|
||||
asm#" $dst, $sbase, $offset", []
|
||||
>;
|
||||
|
||||
def _SGPR : SMRD <
|
||||
op, 0, (outs dstClass:$dst),
|
||||
(ins SReg_64:$sbase, SReg_32:$soff),
|
||||
(ins baseClass:$sbase, SReg_32:$soff),
|
||||
asm#" $dst, $sbase, $soff", []
|
||||
>;
|
||||
}
|
||||
|
@ -458,17 +458,31 @@ def TBUFFER_LOAD_FORMAT_XYZW : MTBUF_Load_Helper <0x00000003, "TBUFFER_LOAD_FORM
|
||||
|
||||
let mayLoad = 1 in {
|
||||
|
||||
defm S_LOAD_DWORD : SMRD_Helper <0x00000000, "S_LOAD_DWORD", SReg_32>;
|
||||
defm S_LOAD_DWORD : SMRD_Helper <0x00, "S_LOAD_DWORD", SReg_64, SReg_32>;
|
||||
defm S_LOAD_DWORDX2 : SMRD_Helper <0x01, "S_LOAD_DWORDX2", SReg_64, SReg_64>;
|
||||
defm S_LOAD_DWORDX4 : SMRD_Helper <0x02, "S_LOAD_DWORDX4", SReg_64, SReg_128>;
|
||||
defm S_LOAD_DWORDX8 : SMRD_Helper <0x03, "S_LOAD_DWORDX8", SReg_64, SReg_256>;
|
||||
defm S_LOAD_DWORDX16 : SMRD_Helper <0x04, "S_LOAD_DWORDX16", SReg_64, SReg_512>;
|
||||
|
||||
//def S_LOAD_DWORDX2 : SMRD_DWORDX2 <0x00000001, "S_LOAD_DWORDX2", []>;
|
||||
defm S_LOAD_DWORDX4 : SMRD_Helper <0x00000002, "S_LOAD_DWORDX4", SReg_128>;
|
||||
defm S_LOAD_DWORDX8 : SMRD_Helper <0x00000003, "S_LOAD_DWORDX8", SReg_256>;
|
||||
//def S_LOAD_DWORDX16 : SMRD_DWORDX16 <0x00000004, "S_LOAD_DWORDX16", []>;
|
||||
//def S_BUFFER_LOAD_DWORD : SMRD_ <0x00000008, "S_BUFFER_LOAD_DWORD", []>;
|
||||
//def S_BUFFER_LOAD_DWORDX2 : SMRD_DWORDX2 <0x00000009, "S_BUFFER_LOAD_DWORDX2", []>;
|
||||
//def S_BUFFER_LOAD_DWORDX4 : SMRD_DWORDX4 <0x0000000a, "S_BUFFER_LOAD_DWORDX4", []>;
|
||||
//def S_BUFFER_LOAD_DWORDX8 : SMRD_DWORDX8 <0x0000000b, "S_BUFFER_LOAD_DWORDX8", []>;
|
||||
//def S_BUFFER_LOAD_DWORDX16 : SMRD_DWORDX16 <0x0000000c, "S_BUFFER_LOAD_DWORDX16", []>;
|
||||
defm S_BUFFER_LOAD_DWORD : SMRD_Helper <
|
||||
0x08, "S_BUFFER_LOAD_DWORD", SReg_128, SReg_32
|
||||
>;
|
||||
|
||||
defm S_BUFFER_LOAD_DWORDX2 : SMRD_Helper <
|
||||
0x09, "S_BUFFER_LOAD_DWORDX2", SReg_128, SReg_64
|
||||
>;
|
||||
|
||||
defm S_BUFFER_LOAD_DWORDX4 : SMRD_Helper <
|
||||
0x0a, "S_BUFFER_LOAD_DWORDX4", SReg_128, SReg_128
|
||||
>;
|
||||
|
||||
defm S_BUFFER_LOAD_DWORDX8 : SMRD_Helper <
|
||||
0x0b, "S_BUFFER_LOAD_DWORDX8", SReg_128, SReg_256
|
||||
>;
|
||||
|
||||
defm S_BUFFER_LOAD_DWORDX16 : SMRD_Helper <
|
||||
0x0c, "S_BUFFER_LOAD_DWORDX16", SReg_128, SReg_512
|
||||
>;
|
||||
|
||||
} // mayLoad = 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user