]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/MC/Disassembler/AMDGPU/trap_gfx9.txt
Vendor import of llvm trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / test / MC / Disassembler / AMDGPU / trap_gfx9.txt
1 # RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -disassemble -show-encoding < %s | FileCheck %s -check-prefix=GFX9
2
3 #===----------------------------------------------------------------------===#
4 # Trap Handler related - 32 bit registers
5 #===----------------------------------------------------------------------===#
6
7 # GFX9:   s_add_u32 ttmp0, ttmp0, 4       ; encoding: [0x6c,0x84,0x6c,0x80]
8 0x6c,0x84,0x6c,0x80
9
10 # GFX9:   s_add_u32 ttmp4, 8, ttmp4       ; encoding: [0x88,0x70,0x70,0x80]
11 0x88,0x70,0x70,0x80
12
13 # GFX9:   s_add_u32 ttmp4, ttmp4, 0x100   ; encoding: [0x70,0xff,0x70,0x80,0x00,0x01,0x00,0x00]
14 0x70,0xff,0x70,0x80,0x00,0x01,0x00,0x00
15
16 # GFX9:   s_add_u32 ttmp4, ttmp4, 4       ; encoding: [0x70,0x84,0x70,0x80]
17 0x70,0x84,0x70,0x80
18
19 # GFX9:   s_add_u32 ttmp4, ttmp8, ttmp4   ; encoding: [0x74,0x70,0x70,0x80]
20 0x74,0x70,0x70,0x80
21
22 # GFX9:   s_and_b32 ttmp10, ttmp8, 0x80   ; encoding: [0x74,0xff,0x76,0x86,0x80,0x00,0x00,0x00]
23 0x74,0xff,0x76,0x86,0x80,0x00,0x00,0x00
24
25 # GFX9:   s_and_b32 ttmp9, ttmp9, 0x1ff   ; encoding: [0x75,0xff,0x75,0x86,0xff,0x01,0x00,0x00]
26 0x75,0xff,0x75,0x86,0xff,0x01,0x00,0x00
27
28 # GFX9:   s_and_b32 ttmp9, ttmp9, ttmp8   ; encoding: [0x75,0x74,0x75,0x86]
29 0x75,0x74,0x75,0x86
30
31 # GFX9:   s_and_b32 ttmp8, ttmp1, 0x1000000 ; encoding: [0x6d,0xff,0x74,0x86,0x00,0x00,0x00,0x01]
32 0x6d,0xff,0x74,0x86,0x00,0x00,0x00,0x01
33
34 # GFX9:   s_cmp_eq_i32 ttmp8, 0           ; encoding: [0x74,0x80,0x00,0xbf]
35 0x74,0x80,0x00,0xbf
36
37 # GFX9:   s_cmp_eq_i32 ttmp8, 0xfe        ; encoding: [0x74,0xff,0x00,0xbf,0xfe,0x00,0x00,0x00]
38 0x74,0xff,0x00,0xbf,0xfe,0x00,0x00,0x00
39
40 # GFX9:   s_lshr_b32 ttmp8, ttmp8, 12     ; encoding: [0x74,0x8c,0x74,0x8f]
41 0x74,0x8c,0x74,0x8f
42
43 # GFX9:   v_mov_b32_e32 v1, ttmp8         ; encoding: [0x74,0x02,0x02,0x7e]
44 0x74,0x02,0x02,0x7e
45
46 # GFX9:   s_mov_b32 m0, ttmp8             ; encoding: [0x74,0x00,0xfc,0xbe]
47 0x74,0x00,0xfc,0xbe
48
49 # GFX9:   s_mov_b32 ttmp10, 0             ; encoding: [0x80,0x00,0xf6,0xbe]
50 0x80,0x00,0xf6,0xbe
51
52 # GFX9:   s_mov_b32 ttmp11, 0x1024fac     ; encoding: [0xff,0x00,0xf7,0xbe,0xac,0x4f,0x02,0x01]
53 0xff,0x00,0xf7,0xbe,0xac,0x4f,0x02,0x01
54
55 # GFX9:   s_mov_b32 ttmp8, m0             ; encoding: [0x7c,0x00,0xf4,0xbe]
56 0x7c,0x00,0xf4,0xbe
57
58 # GFX9:   s_mul_i32 ttmp8, 0x324, ttmp8   ; encoding: [0xff,0x74,0x74,0x92,0x24,0x03,0x00,0x00]
59 0xff,0x74,0x74,0x92,0x24,0x03,0x00,0x00
60
61 # GFX9:   s_or_b32 ttmp9, ttmp9, 0x280000 ; encoding: [0x75,0xff,0x75,0x87,0x00,0x00,0x28,0x00]
62 0x75,0xff,0x75,0x87,0x00,0x00,0x28,0x00
63
64 # GFX9:   s_add_u32 ttmp0, ttmp12, 4       ; encoding: [0x78,0x84,0x6c,0x80]
65 0x78,0x84,0x6c,0x80
66
67 # GFX9:   s_add_u32 ttmp0, ttmp13, 4       ; encoding: [0x79,0x84,0x6c,0x80]
68 0x79,0x84,0x6c,0x80
69
70 # GFX9:   s_add_u32 ttmp0, ttmp14, 4       ; encoding: [0x7a,0x84,0x6c,0x80]
71 0x7a,0x84,0x6c,0x80
72
73 # GFX9:   s_add_u32 ttmp0, ttmp15, 4       ; encoding: [0x7b,0x84,0x6c,0x80]
74 0x7b,0x84,0x6c,0x80
75
76 #===----------------------------------------------------------------------===#
77 # Trap Handler related - Pairs of registers
78 #===----------------------------------------------------------------------===#
79
80 # GFX9:   s_mov_b64 ttmp[4:5], exec       ; encoding: [0x7e,0x01,0xf0,0xbe]
81 0x7e,0x01,0xf0,0xbe
82
83 # GFX9:   s_mov_b64 ttmp[4:5], exec       ; encoding: [0x7e,0x01,0xf0,0xbe]
84 0x7e,0x01,0xf0,0xbe
85
86 # GFX9:   s_mov_b64 exec, ttmp[4:5]       ; encoding: [0x70,0x01,0xfe,0xbe]
87 0x70,0x01,0xfe,0xbe
88
89 # GFX9:   s_mov_b64 ttmp[12:13], exec       ; encoding: [0x7e,0x01,0xf8,0xbe]
90 0x7e,0x01,0xf8,0xbe
91
92 # GFX9:   s_mov_b64 ttmp[14:15], exec       ; encoding: [0x7e,0x01,0xfa,0xbe]
93 0x7e,0x01,0xfa,0xbe
94
95 #===----------------------------------------------------------------------===#
96 # Trap Handler related - Some specific instructions and quadruples of registers
97 #===----------------------------------------------------------------------===#
98
99 # GFX9:   s_setpc_b64 ttmp[2:3]           ; encoding: [0x6e,0x1d,0x80,0xbe]
100 0x6e,0x1d,0x80,0xbe
101
102 # GFX9:   v_readfirstlane_b32 ttmp8, v1   ; encoding: [0x01,0x05,0xe8,0x7e]
103 0x01,0x05,0xe8,0x7e
104
105 # GFX9:   buffer_atomic_inc v1, off, ttmp[8:11], 56 glc ; encoding: [0x00,0x40,0x2c,0xe1,0x00,0x01,0x1d,0xb8]
106 0x00,0x40,0x2c,0xe1,0x00,0x01,0x1d,0xb8
107
108 # GFX9:   buffer_atomic_inc v1, off, ttmp[12:15], 56 glc ; encoding: [0x00,0x40,0x2c,0xe1,0x00,0x01,0x1e,0xb8]
109 0x00,0x40,0x2c,0xe1,0x00,0x01,0x1e,0xb8
110
111 #===----------------------------------------------------------------------===#
112 # Trap Handler related - 8-dword registers
113 #===----------------------------------------------------------------------===#
114
115 # GFX9:   s_buffer_load_dwordx8 ttmp[0:7], s[0:3], s0 ; encoding: [0x00,0x1b,0x2c,0xc0,0x00,0x00,0x00,0x00]
116 0x00,0x1b,0x2c,0xc0,0x00,0x00,0x00,0x00
117
118 # GFX9:   s_buffer_load_dwordx8 ttmp[4:11], s[0:3], s0 ; encoding: [0x00,0x1c,0x2c,0xc0,0x00,0x00,0x00,0x00]
119 0x00,0x1c,0x2c,0xc0,0x00,0x00,0x00,0x00
120
121 # GFX9:   s_buffer_load_dwordx8 ttmp[8:15], s[0:3], s0 ; encoding: [0x00,0x1d,0x2c,0xc0,0x00,0x00,0x00,0x00]
122 0x00,0x1d,0x2c,0xc0,0x00,0x00,0x00,0x00
123
124 # GFX9:   s_load_dwordx8 ttmp[0:7], s[0:1], s0 ; encoding: [0x00,0x1b,0x0c,0xc0,0x00,0x00,0x00,0x00]
125 0x00,0x1b,0x0c,0xc0,0x00,0x00,0x00,0x00
126
127 # GFX9:   s_load_dwordx8 ttmp[4:11], s[0:1], s0 ; encoding: [0x00,0x1c,0x0c,0xc0,0x00,0x00,0x00,0x00]
128 0x00,0x1c,0x0c,0xc0,0x00,0x00,0x00,0x00
129
130 # GFX9:   s_load_dwordx8 ttmp[8:15], s[0:1], s0 ; encoding: [0x00,0x1d,0x0c,0xc0,0x00,0x00,0x00,0x00]
131 0x00,0x1d,0x0c,0xc0,0x00,0x00,0x00,0x00
132
133 #===----------------------------------------------------------------------===#
134 # Trap Handler related - 16-dword registers
135 #===----------------------------------------------------------------------===#
136
137 # GFX9:   s_buffer_load_dwordx16 ttmp[0:15], s[0:3], s0 ; encoding: [0x00,0x1b,0x30,0xc0,0x00,0x00,0x00,0x00]
138 0x00,0x1b,0x30,0xc0,0x00,0x00,0x00,0x00
139
140 # GFX9:   s_load_dwordx16 ttmp[0:15], s[0:1], s0 ; encoding: [0x00,0x1b,0x10,0xc0,0x00,0x00,0x00,0x00]
141 0x00,0x1b,0x10,0xc0,0x00,0x00,0x00,0x00