1 // RUN
: not llvm-mc
-arch
=amdgcn
-mcpu
=gfx1010
-show-encoding
%s | FileCheck
--check-prefixes
=GFX10
,W32
%s
2 // RUN
: not llvm-mc
-arch
=amdgcn
-mcpu
=gfx1010
-show-encoding
%s
2>&1 | FileCheck
--check-prefixes
=GFX10-ERR
,W32-ERR
%s
4 flat_load_dword v1
, v
[3:4]
5 // GFX10
: encoding
: [0x00,0x00,0x30,0xdc,0x03,0x00,0x7d,0x01]
7 flat_load_dword v1
, v
[3:4] offset
:-1
8 // GFX10-ERR
: :28: error
: expected an
11-bit unsigned offset
10 flat_load_dword v1
, v
[3:4] offset
:2047
11 // GFX10
: encoding
: [0xff,0x07,0x30,0xdc,0x03,0x00,0x7d,0x01]
13 flat_load_dword v1
, v
[3:4] offset
:2048
14 // GFX10-ERR
: error
: expected an
11-bit unsigned offset
16 flat_load_dword v1
, v
[3:4] offset
:4 glc
17 // GFX10
: encoding
: [0x04,0x00,0x31,0xdc,0x03,0x00,0x7d,0x01]
19 flat_load_dword v1
, v
[3:4] offset
:4 glc slc
20 // GFX10
: encoding
: [0x04,0x00,0x33,0xdc,0x03,0x00,0x7d,0x01]
22 flat_load_dword v1
, v
[3:4] offset
:4 glc slc dlc
23 // GFX10
: encoding
: [0x04,0x10,0x33,0xdc,0x03,0x00,0x7d,0x01]
25 flat_atomic_add v
[3:4], v5 offset
:8 slc
26 // GFX10
: encoding
: [0x08,0x00,0xca,0xdc,0x03,0x05,0x7d,0x00]
28 flat_atomic_cmpswap v
[1:2], v
[3:4] offset
:2047
29 // GFX10
: encoding
: [0xff,0x07,0xc4,0xdc,0x01,0x03,0x7d,0x00]
31 flat_atomic_cmpswap v
[1:2], v
[3:4] offset
:2047 slc
32 // GFX10
: encoding
: [0xff,0x07,0xc6,0xdc,0x01,0x03,0x7d,0x00]
34 flat_atomic_cmpswap v
[1:2], v
[3:4]
35 // GFX10
: encoding
: [0x00,0x00,0xc4,0xdc,0x01,0x03,0x7d,0x00]
37 flat_atomic_cmpswap v
[1:2], v
[3:4] slc
38 // GFX10
: encoding
: [0x00,0x00,0xc6,0xdc,0x01,0x03,0x7d,0x00]
40 flat_atomic_cmpswap v
[1:2], v
[3:4] offset
:2047 glc
41 // GFX10-ERR
: error
: invalid operand for instruction
43 flat_atomic_cmpswap v
[1:2], v
[3:4] glc
44 // GFX10-ERR
: error
: invalid operand for instruction
46 flat_atomic_cmpswap v0
, v
[1:2], v
[3:4] offset
:2047 glc
47 // GFX10
: encoding
: [0xff,0x07,0xc5,0xdc,0x01,0x03,0x7d,0x00]
49 flat_atomic_cmpswap v0
, v
[1:2], v
[3:4] offset
:2047 glc slc
50 // GFX10
: encoding
: [0xff,0x07,0xc7,0xdc,0x01,0x03,0x7d,0x00]
52 flat_atomic_cmpswap v0
, v
[1:2], v
[3:4] glc
53 // GFX10
: encoding
: [0x00,0x00,0xc5,0xdc,0x01,0x03,0x7d,0x00]
55 flat_atomic_cmpswap v0
, v
[1:2], v
[3:4] glc slc
56 // GFX10
: encoding
: [0x00,0x00,0xc7,0xdc,0x01,0x03,0x7d,0x00]
58 flat_atomic_cmpswap v0
, v
[1:2], v
[3:4] glc
59 // GFX10
: encoding
: [0x00,0x00,0xc5,0xdc,0x01,0x03,0x7d,0x00]
61 flat_atomic_cmpswap v0
, v
[1:2], v
[3:4] offset
:2047
62 // GFX10-ERR
: error
: too few operands for instruction
64 flat_atomic_cmpswap v0
, v
[1:2], v
[3:4] slc
65 // GFX10-ERR
: error
: invalid operand for instruction
67 flat_atomic_swap v
[3:4], v5 offset
:16
68 // GFX10
: encoding
: [0x10,0x00,0xc0,0xdc,0x03,0x05,0x7d,0x00]
70 flat_store_dword v
[3:4], v1 offset
:16
71 // GFX10
: encoding
: [0x10,0x00,0x70,0xdc,0x03,0x01,0x7d,0x00]
73 flat_store_dword v
[3:4], v1
, off
74 // GFX10-ERR
: error
: invalid operand for instruction
76 flat_store_dword v
[3:4], v1
, s
[0:1]
77 // GFX10-ERR
: error
: invalid operand for instruction
79 flat_store_dword v
[3:4], v1
, s0
80 // GFX10-ERR
: error
: invalid operand for instruction
82 flat_load_dword v1
, v
[3:4], off
83 // GFX10-ERR
: error
: invalid operand for instruction
85 flat_load_dword v1
, v
[3:4], s
[0:1]
86 // GFX10-ERR
: error
: invalid operand for instruction
88 flat_load_dword v1
, v
[3:4], s0
89 // GFX10-ERR
: error
: invalid operand for instruction
91 flat_load_dword v1
, v
[3:4], exec_hi
92 // GFX10-ERR
: error
: invalid operand for instruction
94 flat_store_dword v
[3:4], v1
, exec_hi
95 // GFX10-ERR
: error
: invalid operand for instruction
97 flat_load_ubyte_d16 v1
, v
[3:4]
98 // GFX10
: encoding
: [0x00,0x00,0x80,0xdc,0x03,0x00,0x7d,0x01]
100 flat_load_ubyte_d16_hi v1
, v
[3:4]
101 // GFX10
: encoding
: [0x00,0x00,0x84,0xdc,0x03,0x00,0x7d,0x01]
103 flat_load_sbyte_d16 v1
, v
[3:4]
104 // GFX10
: encoding
: [0x00,0x00,0x88,0xdc,0x03,0x00,0x7d,0x01]
106 flat_load_sbyte_d16_hi v1
, v
[3:4]
107 // GFX10
: encoding
: [0x00,0x00,0x8c,0xdc,0x03,0x00,0x7d,0x01]
109 flat_load_short_d16 v1
, v
[3:4]
110 // GFX10
: encoding
: [0x00,0x00,0x90,0xdc,0x03,0x00,0x7d,0x01]
112 flat_load_short_d16_hi v1
, v
[3:4]
113 // GFX10
: encoding
: [0x00,0x00,0x94,0xdc,0x03,0x00,0x7d,0x01]
115 flat_store_byte_d16_hi v
[3:4], v1
116 // GFX10
: encoding
: [0x00,0x00,0x64,0xdc,0x03,0x01,0x7d,0x00]
118 flat_store_short_d16_hi v
[3:4], v1
119 // GFX10
: encoding
: [0x00,0x00,0x6c,0xdc,0x03,0x01,0x7d,0x00]