1# RUN: llvm-mc -triple=amdgcn -mcpu=tonga -disassemble -show-encoding < %s | FileCheck -strict-whitespace %s 2 3# CHECK: s_nop 0x3141 ; encoding: [0x41,0x31,0x80,0xbf] 40x41,0x31,0x80,0xbf 5 6# CHECK: s_nop 0xc1d1 ; encoding: [0xd1,0xc1,0x80,0xbf] 70xd1,0xc1,0x80,0xbf 8 9# CHECK: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 100x00,0x00,0x81,0xbf 11 12# CHECK: s_endpgm 1 ; encoding: [0x01,0x00,0x81,0xbf] 130x01,0x00,0x81,0xbf 14 15# CHECK: s_endpgm 65535 ; encoding: [0xff,0xff,0x81,0xbf] 160xff,0xff,0x81,0xbf 17 18# CHECK: s_branch 12609 ; encoding: [0x41,0x31,0x82,0xbf] 190x41,0x31,0x82,0xbf 20 21# CHECK: s_branch 49617 ; encoding: [0xd1,0xc1,0x82,0xbf] 220xd1,0xc1,0x82,0xbf 23 24# CHECK: s_wakeup ; encoding: [0x00,0x00,0x83,0xbf] 250x00,0x00,0x83,0xbf 26 27# CHECK: s_cbranch_scc0 12609 ; encoding: [0x41,0x31,0x84,0xbf] 280x41,0x31,0x84,0xbf 29 30# CHECK: s_cbranch_scc0 49617 ; encoding: [0xd1,0xc1,0x84,0xbf] 310xd1,0xc1,0x84,0xbf 32 33# CHECK: s_cbranch_scc1 12609 ; encoding: [0x41,0x31,0x85,0xbf] 340x41,0x31,0x85,0xbf 35 36# CHECK: s_cbranch_scc1 49617 ; encoding: [0xd1,0xc1,0x85,0xbf] 370xd1,0xc1,0x85,0xbf 38 39# CHECK: s_cbranch_vccz 12609 ; encoding: [0x41,0x31,0x86,0xbf] 400x41,0x31,0x86,0xbf 41 42# CHECK: s_cbranch_vccz 49617 ; encoding: [0xd1,0xc1,0x86,0xbf] 430xd1,0xc1,0x86,0xbf 44 45# CHECK: s_cbranch_vccnz 12609 ; encoding: [0x41,0x31,0x87,0xbf] 460x41,0x31,0x87,0xbf 47 48# CHECK: s_cbranch_vccnz 49617 ; encoding: [0xd1,0xc1,0x87,0xbf] 490xd1,0xc1,0x87,0xbf 50 51# CHECK: s_cbranch_execz 12609 ; encoding: [0x41,0x31,0x88,0xbf] 520x41,0x31,0x88,0xbf 53 54# CHECK: s_cbranch_execz 49617 ; encoding: [0xd1,0xc1,0x88,0xbf] 550xd1,0xc1,0x88,0xbf 56 57# CHECK: s_cbranch_execnz 12609 ; encoding: [0x41,0x31,0x89,0xbf] 580x41,0x31,0x89,0xbf 59 60# CHECK: s_cbranch_execnz 49617 ; encoding: [0xd1,0xc1,0x89,0xbf] 610xd1,0xc1,0x89,0xbf 62 63# CHECK: s_barrier ; encoding: [0x00,0x00,0x8a,0xbf] 640x00,0x00,0x8a,0xbf 65 66# CHECK: s_setkill 0x3141 ; encoding: [0x41,0x31,0x8b,0xbf] 670x41,0x31,0x8b,0xbf 68 69# CHECK: s_setkill 0xc1d1 ; encoding: [0xd1,0xc1,0x8b,0xbf] 700xd1,0xc1,0x8b,0xbf 71 72# CHECK: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) ; encoding: [0x00,0x00,0x8c,0xbf] 730x00 0x00 0x8c 0xbf 74 75# CHECK: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) ; encoding: [0x00,0x00,0x8c,0xbf] 760x00 0x00 0x8c 0xbf 77 78# CHECK: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) ; encoding: [0x00,0x00,0x8c,0xbf] 790x00 0x00 0x8c 0xbf 80 81# CHECK: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) ; encoding: [0x00,0x00,0x8c,0xbf] 820x00 0x00 0x8c 0xbf 83 84# CHECK: s_waitcnt vmcnt(1) ; encoding: [0x71,0x0f,0x8c,0xbf] 850x71 0x0f 0x8c 0xbf 86 87# CHECK: s_waitcnt vmcnt(9) ; encoding: [0x79,0x0f,0x8c,0xbf] 880x79 0x0f 0x8c 0xbf 89 90# CHECK: s_waitcnt expcnt(2) ; encoding: [0x2f,0x0f,0x8c,0xbf] 910x2f 0x0f 0x8c 0xbf 92 93# CHECK: s_waitcnt lgkmcnt(3) ; encoding: [0x7f,0x03,0x8c,0xbf] 940x7f 0x03 0x8c 0xbf 95 96# CHECK: s_waitcnt lgkmcnt(9) ; encoding: [0x7f,0x09,0x8c,0xbf] 970x7f 0x09 0x8c 0xbf 98 99# CHECK: s_waitcnt vmcnt(0) expcnt(0) ; encoding: [0x00,0x0f,0x8c,0xbf] 1000x00 0x0f 0x8c 0xbf 101 102# CHECK: s_sethalt 0x3141 ; encoding: [0x41,0x31,0x8d,0xbf] 1030x41,0x31,0x8d,0xbf 104 105# CHECK: s_sethalt 0xc1d1 ; encoding: [0xd1,0xc1,0x8d,0xbf] 1060xd1,0xc1,0x8d,0xbf 107 108# CHECK: s_sleep 0x3141 ; encoding: [0x41,0x31,0x8e,0xbf] 1090x41,0x31,0x8e,0xbf 110 111# CHECK: s_sleep 0xc1d1 ; encoding: [0xd1,0xc1,0x8e,0xbf] 1120xd1,0xc1,0x8e,0xbf 113 114# CHECK: s_setprio 0x3141 ; encoding: [0x41,0x31,0x8f,0xbf] 1150x41,0x31,0x8f,0xbf 116 117# CHECK: s_setprio 0xc1d1 ; encoding: [0xd1,0xc1,0x8f,0xbf] 1180xd1,0xc1,0x8f,0xbf 119 120# CHECK: s_sendmsg sendmsg(2, 0, 0) ; encoding: [0x02,0x00,0x90,0xbf] 1210x02 0x00 0x90 0xbf 122 123# CHECK: s_sendmsg sendmsg(MSG_INTERRUPT) ; encoding: [0x01,0x00,0x90,0xbf] 1240x01 0x00 0x90 0xbf 125 126# CHECK: s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 0) ; encoding: [0x12,0x00,0x90,0xbf] 1270x12 0x00 0x90 0xbf 128 129# CHECK: s_sendmsg sendmsg(MSG_GS, GS_OP_EMIT, 1) ; encoding: [0x22,0x01,0x90,0xbf] 1300x22 0x01 0x90 0xbf 131 132# CHECK: s_sendmsg sendmsg(MSG_GS, GS_OP_EMIT_CUT, 2) ; encoding: [0x32,0x02,0x90,0xbf] 1330x32 0x02 0x90 0xbf 134 135# CHECK: s_sendmsg sendmsg(MSG_GS_DONE, GS_OP_NOP) ; encoding: [0x03,0x00,0x90,0xbf] 1360x03 0x00 0x90 0xbf 137 138# CHECK: s_sendmsg sendmsg(MSG_SAVEWAVE) ; encoding: [0x04,0x00,0x90,0xbf] 1390x04 0x00 0x90 0xbf 140 141# CHECK: s_sendmsg sendmsg(11, 0, 0) ; encoding: [0x0b,0x00,0x90,0xbf] 1420x0b 0x00 0x90 0xbf 143 144# CHECK: s_sendmsg sendmsg(MSG_SYSMSG, SYSMSG_OP_ECC_ERR_INTERRUPT) ; encoding: [0x1f,0x00,0x90,0xbf] 1450x1f 0x00 0x90 0xbf 146 147# CHECK: s_sendmsg sendmsg(15, 6, 0) ; encoding: [0x6f,0x00,0x90,0xbf] 1480x6f 0x00 0x90 0xbf 149 150# CHECK: s_sendmsg sendmsg(1, 3, 0) ; encoding: [0x31,0x00,0x90,0xbf] 1510x31 0x00 0x90 0xbf 152 153# CHECK: s_sendmsg sendmsg(1, 3, 2) ; encoding: [0x31,0x02,0x90,0xbf] 1540x31 0x02 0x90 0xbf 155 156# CHECK: s_sendmsg sendmsg(2, 0, 1) ; encoding: [0x02,0x01,0x90,0xbf] 1570x02 0x01 0x90 0xbf 158 159# CHECK: s_sendmsg sendmsg(4, 0, 1) ; encoding: [0x04,0x01,0x90,0xbf] 1600x04 0x01 0x90 0xbf 161 162# CHECK: s_sendmsg sendmsg(15, 7, 3) ; encoding: [0x7f,0x03,0x90,0xbf] 1630x7f 0x03 0x90 0xbf 164 165# CHECK: s_sendmsg 4567 ; encoding: [0xd7,0x11,0x90,0xbf] 1660xd7 0x11 0x90 0xbf 167 168# CHECK: s_sendmsghalt sendmsg(MSG_GS_DONE, GS_OP_NOP) ; encoding: [0x03,0x00,0x91,0xbf] 1690x03 0x00 0x91 0xbf 170 171# CHECK: s_sendmsghalt sendmsg(MSG_GS, GS_OP_EMIT, 1) ; encoding: [0x22,0x01,0x91,0xbf] 1720x22 0x01 0x91 0xbf 173 174# CHECK: s_sendmsghalt sendmsg(15, 6, 0) ; encoding: [0x6f,0x00,0x91,0xbf] 1750x6f 0x00 0x91 0xbf 176 177# CHECK: s_trap 0x3141 ; encoding: [0x41,0x31,0x92,0xbf] 1780x41,0x31,0x92,0xbf 179 180# CHECK: s_trap 0xc1d1 ; encoding: [0xd1,0xc1,0x92,0xbf] 1810xd1,0xc1,0x92,0xbf 182 183# CHECK: s_icache_inv ; encoding: [0x00,0x00,0x93,0xbf] 1840x00,0x00,0x93,0xbf 185 186# CHECK: s_incperflevel 0x3141 ; encoding: [0x41,0x31,0x94,0xbf] 1870x41,0x31,0x94,0xbf 188 189# CHECK: s_incperflevel 0xc1d1 ; encoding: [0xd1,0xc1,0x94,0xbf] 1900xd1,0xc1,0x94,0xbf 191 192# CHECK: s_decperflevel 0x3141 ; encoding: [0x41,0x31,0x95,0xbf] 1930x41,0x31,0x95,0xbf 194 195# CHECK: s_decperflevel 0xc1d1 ; encoding: [0xd1,0xc1,0x95,0xbf] 1960xd1,0xc1,0x95,0xbf 197 198# CHECK: s_ttracedata ; encoding: [0x00,0x00,0x96,0xbf] 1990x00,0x00,0x96,0xbf 200 201# CHECK: s_cbranch_cdbgsys 12609 ; encoding: [0x41,0x31,0x97,0xbf] 2020x41,0x31,0x97,0xbf 203 204# CHECK: s_cbranch_cdbgsys 49617 ; encoding: [0xd1,0xc1,0x97,0xbf] 2050xd1,0xc1,0x97,0xbf 206 207# CHECK: s_cbranch_cdbguser 12609 ; encoding: [0x41,0x31,0x98,0xbf] 2080x41,0x31,0x98,0xbf 209 210# CHECK: s_cbranch_cdbguser 49617 ; encoding: [0xd1,0xc1,0x98,0xbf] 2110xd1,0xc1,0x98,0xbf 212 213# CHECK: s_cbranch_cdbgsys_or_user 12609 ; encoding: [0x41,0x31,0x99,0xbf] 2140x41,0x31,0x99,0xbf 215 216# CHECK: s_cbranch_cdbgsys_or_user 49617 ; encoding: [0xd1,0xc1,0x99,0xbf] 2170xd1,0xc1,0x99,0xbf 218 219# CHECK: s_cbranch_cdbgsys_and_user 12609 ; encoding: [0x41,0x31,0x9a,0xbf] 2200x41,0x31,0x9a,0xbf 221 222# CHECK: s_cbranch_cdbgsys_and_user 49617 ; encoding: [0xd1,0xc1,0x9a,0xbf] 2230xd1,0xc1,0x9a,0xbf 224 225# CHECK: s_endpgm_saved ; encoding: [0x00,0x00,0x9b,0xbf] 2260x00,0x00,0x9b,0xbf 227 228# CHECK: s_set_gpr_idx_off ; encoding: [0x00,0x00,0x9c,0xbf] 2290x00,0x00,0x9c,0xbf 230 231# CHECK: s_set_gpr_idx_mode gpr_idx() ; encoding: [0x00,0x00,0x9d,0xbf] 2320x00,0x00,0x9d,0xbf 233 234# CHECK: s_set_gpr_idx_mode gpr_idx(SRC0) ; encoding: [0x01,0x00,0x9d,0xbf] 2350x01,0x00,0x9d,0xbf 236 237# CHECK: s_set_gpr_idx_mode gpr_idx(SRC0,SRC1,SRC2,DST) ; encoding: [0x0f,0x00,0x9d,0xbf] 2380x0f,0x00,0x9d,0xbf 239