[PATCH] D99804: [AMDGPU][MC][GFX9] Corrected SMEM decoding
Dmitry Preobrazhensky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 04:11:08 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3eadcb86abd2: [AMDGPU][MC][GFX9] Corrected SMEM decoding (authored by dp).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99804/new/
https://reviews.llvm.org/D99804
Files:
llvm/lib/Target/AMDGPU/SMInstructions.td
llvm/test/MC/Disassembler/AMDGPU/smem_gfx9.txt
Index: llvm/test/MC/Disassembler/AMDGPU/smem_gfx9.txt
===================================================================
--- llvm/test/MC/Disassembler/AMDGPU/smem_gfx9.txt
+++ llvm/test/MC/Disassembler/AMDGPU/smem_gfx9.txt
@@ -291,3 +291,16 @@
# GFX9: s_atc_probe_buffer 1, s[8:11], -0x1 ; encoding: [0x44,0x00,0x9e,0xc0,0xff,0xff,0x1f,0x00]
0x44,0x00,0x9e,0xc0,0xff,0xff,0x1f,0x00
+
+#===------------------------------------------------------------------------===#
+# Decoding of OFFSET>127 with IMM=0
+#===------------------------------------------------------------------------===#
+
+# GFX9: s_atomic_or s5, s[2:3], s15 ; encoding: [0x41,0x01,0x24,0xc2,0x0f,0x00,0x00,0x00]
+0x41,0x01,0x24,0xc2,0x8f,0x00,0x00,0x00
+
+# GFX9: s_atomic_or s5, s[2:3], exec_hi ; encoding: [0x41,0x01,0x24,0xc2,0x7f,0x00,0x00,0x00]
+0x41,0x01,0x24,0xc2,0xff,0xff,0x00,0x00
+
+# GFX9: s_atomic_add_x2 s[34:35], exec, s11 glc ; encoding: [0xbf,0x08,0x89,0xc2,0x0b,0x00,0x00,0x00]
+0xbf,0x08,0x89,0xc2,0x0b,0x00,0x00,0x00
Index: llvm/lib/Target/AMDGPU/SMInstructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/SMInstructions.td
+++ llvm/lib/Target/AMDGPU/SMInstructions.td
@@ -515,7 +515,8 @@
// VI supports 20-bit unsigned offsets while GFX9+ supports 21-bit signed.
// Offset value is corrected accordingly when offset is encoded/decoded.
- let Inst{52-32} = !if(ps.has_offset, offset{20-0}, ?);
+ let Inst{38-32} = !if(ps.has_offset, offset{6-0}, ?);
+ let Inst{52-39} = !if(ps.has_offset, !if(imm, offset{20-7}, ?), ?);
}
multiclass SM_Real_Loads_vi<bits<8> op, string ps,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99804.335471.patch
Type: text/x-patch
Size: 1653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210406/7408e9ee/attachment.bin>
More information about the llvm-commits
mailing list