File: gfx11_asm_operands.s

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (143 lines) | stat: -rw-r--r-- 5,647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1030 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1100 -show-encoding %s | FileCheck --check-prefix=GFX11 %s
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1100 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX11-ERR %s

// On GFX11+, EXECZ and VCCZ are no longer allowed to be used as sources to SALU and VALU instructions.
// The inline constants are removed. VCCZ and EXECZ still exist and can be use for conditional branches.
// LDS_DIRECT and POPS_EXITING_WAVE_ID are also no longer allowed.

//---------------------------------------------------------------------------//
// EXECZ
//---------------------------------------------------------------------------//

s_cbranch_execz 0x100
// GFX10: encoding: [0x00,0x01,0x88,0xbf]
// GFX11: encoding: [0x00,0x01,0xa5,0xbf]

s_add_i32 s0, execz, s2
// GFX10: encoding: [0xfc,0x02,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

s_add_i32 s0, src_execz, s2
// GFX10: encoding: [0xfc,0x02,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

s_add_i32 s0, s1, execz
// GFX10: encoding: [0x01,0xfc,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

s_add_i32 s0, s1, src_execz
// GFX10: encoding: [0x01,0xfc,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], execz, v[2:3]
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfc,0x04,0x02,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], src_execz, v[2:3]
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfc,0x04,0x02,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], v[1:2], execz
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf9,0x01,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], v[1:2], src_execz
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf9,0x01,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

//---------------------------------------------------------------------------//
// VCCZ
//---------------------------------------------------------------------------//

s_cbranch_vccz 0x100
// GFX10: encoding: [0x00,0x01,0x86,0xbf]
// GFX11: encoding: [0x00,0x01,0xa3,0xbf]

s_add_i32 s0, vccz, s2
// GFX10: encoding: [0xfb,0x02,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

s_add_i32 s0, src_vccz, s2
// GFX10: encoding: [0xfb,0x02,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

s_add_i32 s0, s1, vccz
// GFX10: encoding: [0x01,0xfb,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

s_add_i32 s0, s1, src_vccz
// GFX10: encoding: [0x01,0xfb,0x00,0x81]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], vccz, v[2:3]
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfb,0x04,0x02,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], src_vccz, v[2:3]
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfb,0x04,0x02,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], v[1:2], vccz
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf7,0x01,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

v_add_f64 v[0:1], v[1:2], src_vccz
// GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf7,0x01,0x00]
// GFX11-ERR: error: execz and vccz are not supported on this GPU

//---------------------------------------------------------------------------//
// LDS_DIRECT
//---------------------------------------------------------------------------//

v_readfirstlane_b32 s0, lds_direct
// GFX10: encoding: [0xfe,0x04,0x00,0x7e]
// GFX11-ERR: error: lds_direct is not supported on this GPU

v_readfirstlane_b32 s0, src_lds_direct
// GFX10: encoding: [0xfe,0x04,0x00,0x7e]
// GFX11-ERR: error: lds_direct is not supported on this GPU

v_mov_b32 v0, lds_direct
// GFX10: encoding: [0xfe,0x02,0x00,0x7e]
// GFX11-ERR: error: lds_direct is not supported on this GPU

v_mov_b32 v0, src_lds_direct
// GFX10: encoding: [0xfe,0x02,0x00,0x7e]
// GFX11-ERR: error: lds_direct is not supported on this GPU

//---------------------------------------------------------------------------//
// POPS_EXITING_WAVE_ID
//---------------------------------------------------------------------------//

s_add_i32 s0, src_pops_exiting_wave_id, s1
// GFX10: encoding: [0xef,0x01,0x00,0x81]
// GFX11-ERR: error: register not available on this GPU

s_add_i32 s0, s1, src_pops_exiting_wave_id
// GFX10: encoding: [0x01,0xef,0x00,0x81]
// GFX11-ERR: error: register not available on this GPU

s_add_i32 s0, pops_exiting_wave_id, s1
// GFX10: encoding: [0xef,0x01,0x00,0x81]
// GFX11-ERR: error: register not available on this GPU

s_add_i32 s0, s1, pops_exiting_wave_id
// GFX10: encoding: [0x01,0xef,0x00,0x81]
// GFX11-ERR: error: register not available on this GPU

v_add_co_u32 v0, s0, pops_exiting_wave_id, v1
// GFX10: encoding: [0x00,0x00,0x0f,0xd7,0xef,0x02,0x02,0x00]
// GFX11-ERR: error: register not available on this GPU

v_add_co_u32 v0, s0, src_pops_exiting_wave_id, v1
// GFX10: encoding: [0x00,0x00,0x0f,0xd7,0xef,0x02,0x02,0x00]
// GFX11-ERR: error: register not available on this GPU

v_add_co_u32 v0, s0, v1, pops_exiting_wave_id
// GFX10: encoding: [0x00,0x00,0x0f,0xd7,0x01,0xdf,0x01,0x00]
// GFX11-ERR: error: register not available on this GPU

v_add_co_u32 v0, s0, v1, src_pops_exiting_wave_id
// GFX10: encoding: [0x00,0x00,0x0f,0xd7,0x01,0xdf,0x01,0x00]
// GFX11-ERR: error: register not available on this GPU