forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU][MC][DISASSEMBLER][GFX9] Corrected decoding of GLOBAL/SCRATCH…
… opcodes See bug 35433: https://bugs.llvm.org/show_bug.cgi?id=35433 Differential Revision: https://reviews.llvm.org/D40493 Reviewers: artem.tamazov, SamWot, arsenm git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319050 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
4 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx901 -disassemble -show-encoding < %s | FileCheck %s | ||
|
||
# CHECK: flat_atomic_add v[0:1], v0 ; encoding: [0x00,0x00,0x08,0xdd,0x00,0x00,0x00,0x00] | ||
0x00,0x00,0x08,0xdd,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_atomic_add v[0:1], v0 offset:7 ; encoding: [0x07,0x00,0x08,0xdd,0x00,0x00,0x00,0x00] | ||
0x07,0x00,0x08,0xdd,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_atomic_add v0, v[0:1], v0 offset:4095 glc ; encoding: [0xff,0x0f,0x09,0xdd,0x00,0x00,0x00,0x00] | ||
0xff,0x0f,0x09,0xdd,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_atomic_add v[0:1], v0 offset:4095 slc ; encoding: [0xff,0x0f,0x0a,0xdd,0x00,0x00,0x00,0x00] | ||
0xff,0x0f,0x0a,0xdd,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_load_dword v0, v[0:1] ; encoding: [0x00,0x00,0x50,0xdc,0x00,0x00,0x00,0x00] | ||
0x00,0x00,0x50,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_load_dword v0, v[0:1] offset:7 ; encoding: [0x07,0x00,0x50,0xdc,0x00,0x00,0x00,0x00] | ||
0x07,0x00,0x50,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_load_dword v0, v[0:1] offset:4095 glc ; encoding: [0xff,0x0f,0x51,0xdc,0x00,0x00,0x00,0x00] | ||
0xff,0x0f,0x51,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_store_byte v[0:1], v0 ; encoding: [0x00,0x00,0x60,0xdc,0x00,0x00,0x00,0x00] | ||
0x00,0x00,0x60,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_store_byte v[0:1], v0 offset:7 ; encoding: [0x07,0x00,0x60,0xdc,0x00,0x00,0x00,0x00] | ||
0x07,0x00,0x60,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: flat_store_byte v[0:1], v0 offset:4095 glc ; encoding: [0xff,0x0f,0x61,0xdc,0x00,0x00,0x00,0x00] | ||
0xff,0x0f,0x61,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: global_atomic_add v[2:3], v4, s[0:1] ; encoding: [0x00,0x80,0x08,0xdd,0x02,0x04,0x00,0x00] | ||
0x00,0x80,0x08,0xdd,0x02,0x04,0x00,0x00 | ||
|
||
# CHECK: global_atomic_add v[2:3], v4, s[0:1] offset:4095 ; encoding: [0xff,0x8f,0x08,0xdd,0x02,0x04,0x00,0x00] | ||
0xff,0x8f,0x08,0xdd,0x02,0x04,0x00,0x00 | ||
|
||
# CHECK: global_atomic_add v[2:3], v4, s[0:1] offset:-4096 ; encoding: [0x00,0x90,0x08,0xdd,0x02,0x04,0x00,0x00] | ||
0x00,0x90,0x08,0xdd,0x02,0x04,0x00,0x00 | ||
|
||
# CHECK: global_atomic_add v0, v[2:3], v4, s[0:1] offset:-1 glc ; encoding: [0xff,0x9f,0x09,0xdd,0x02,0x04,0x00,0x00] | ||
0xff,0x9f,0x09,0xdd,0x02,0x04,0x00,0x00 | ||
|
||
# CHECK: global_load_sbyte v0, v[2:3], s[0:1] ; encoding: [0x00,0x80,0x44,0xdc,0x02,0x00,0x00,0x00] | ||
0x00,0x80,0x44,0xdc,0x02,0x00,0x00,0x00 | ||
|
||
# CHECK: global_load_sbyte v0, v[2:3], s[0:1] offset:4095 ; encoding: [0xff,0x8f,0x44,0xdc,0x02,0x00,0x00,0x00] | ||
0xff,0x8f,0x44,0xdc,0x02,0x00,0x00,0x00 | ||
|
||
# CHECK: global_load_sbyte v0, v[2:3], s[0:1] offset:-4096 ; encoding: [0x00,0x90,0x44,0xdc,0x02,0x00,0x00,0x00] | ||
0x00,0x90,0x44,0xdc,0x02,0x00,0x00,0x00 | ||
|
||
# CHECK: global_store_dwordx2 v[2:3], v[4:5], s[0:1] ; encoding: [0x00,0x80,0x74,0xdc,0x02,0x04,0x00,0x00] | ||
0x00,0x80,0x74,0xdc,0x02,0x04,0x00,0x00 | ||
|
||
# CHECK: global_store_dwordx2 v[2:3], v[4:5], s[0:1] offset:4095 ; encoding: [0xff,0x8f,0x74,0xdc,0x02,0x04,0x00,0x00] | ||
0xff,0x8f,0x74,0xdc,0x02,0x04,0x00,0x00 | ||
|
||
# CHECK: global_store_dwordx2 v[2:3], v[4:5], s[0:1] offset:-4096 ; encoding: [0x00,0x90,0x74,0xdc,0x02,0x04,0x00,0x00] | ||
0x00,0x90,0x74,0xdc,0x02,0x04,0x00,0x00 | ||
|
||
# CHECK: scratch_load_dword v0, v0, off offset:-1 ; encoding: [0xff,0x5f,0x50,0xdc,0x00,0x00,0x7f,0x00] | ||
0xff,0x5f,0x50,0xdc,0x00,0x00,0x7f,0x00 | ||
|
||
# CHECK: scratch_load_dword v0, off, s0 ; encoding: [0x00,0x40,0x50,0xdc,0x00,0x00,0x00,0x00] | ||
0x00,0x40,0x50,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: scratch_load_dword v0, off, s0 offset:4095 ; encoding: [0xff,0x4f,0x50,0xdc,0x00,0x00,0x00,0x00] | ||
0xff,0x4f,0x50,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: scratch_load_dword v0, off, s0 offset:-4096 ; encoding: [0x00,0x50,0x50,0xdc,0x00,0x00,0x00,0x00] | ||
0x00,0x50,0x50,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: scratch_store_short v0, v0, off offset:-1 ; encoding: [0xff,0x5f,0x68,0xdc,0x00,0x00,0x7f,0x00] | ||
0xff,0x5f,0x68,0xdc,0x00,0x00,0x7f,0x00 | ||
|
||
# CHECK: scratch_store_short off, v0, s0 ; encoding: [0x00,0x40,0x68,0xdc,0x00,0x00,0x00,0x00] | ||
0x00,0x40,0x68,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: scratch_store_short off, v0, s0 offset:4095 ; encoding: [0xff,0x4f,0x68,0xdc,0x00,0x00,0x00,0x00] | ||
0xff,0x4f,0x68,0xdc,0x00,0x00,0x00,0x00 | ||
|
||
# CHECK: scratch_store_short off, v0, s0 offset:-4096 ; encoding: [0x00,0x50,0x68,0xdc,0x00,0x00,0x00,0x00] | ||
0x00,0x50,0x68,0xdc,0x00,0x00,0x00,0x00 |