1// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s 2// RUN: llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s | FileCheck %s 3 4// CHECK: s_add_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x80] 5s_add_u32 s1, s2, s3 6 7// CHECK: s_sub_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x80] 8s_sub_u32 s1, s2, s3 9 10// CHECK: s_add_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x81] 11s_add_i32 s1, s2, s3 12 13// CHECK: s_sub_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x81] 14s_sub_i32 s1, s2, s3 15 16// CHECK: s_addc_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x82] 17s_addc_u32 s1, s2, s3 18 19// CHECK: s_subb_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x82] 20s_subb_u32 s1, s2, s3 21 22// CHECK: s_min_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x83] 23s_min_i32 s1, s2, s3 24 25// CHECK: s_min_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x83] 26s_min_u32 s1, s2, s3 27 28// CHECK: s_max_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x84] 29s_max_i32 s1, s2, s3 30 31// CHECK: s_max_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x84] 32s_max_u32 s1, s2, s3 33 34// CHECK: s_cselect_b32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x85] 35s_cselect_b32 s1, s2, s3 36 37// CHECK: s_cselect_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x85] 38s_cselect_b64 s[2:3], s[4:5], s[6:7] 39 40// CHECK: s_and_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x87] 41s_and_b32 s2, s4, s6 42 43// CHECK: s_and_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x87] 44s_and_b64 s[2:3], s[4:5], s[6:7] 45 46// CHECK: s_or_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x88] 47s_or_b32 s2, s4, s6 48 49// CHECK: s_or_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x88] 50s_or_b64 s[2:3], s[4:5], s[6:7] 51 52// CHECK: s_xor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x89] 53s_xor_b32 s2, s4, s6 54 55// CHECK: s_xor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x89] 56s_xor_b64 s[2:3], s[4:5], s[6:7] 57 58// CHECK: s_andn2_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8a] 59s_andn2_b32 s2, s4, s6 60 61// CHECK: s_andn2_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8a] 62s_andn2_b64 s[2:3], s[4:5], s[6:7] 63 64// CHECK: s_orn2_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8b] 65s_orn2_b32 s2, s4, s6 66 67// CHECK: s_orn2_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8b] 68s_orn2_b64 s[2:3], s[4:5], s[6:7] 69 70// CHECK: s_nand_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8c] 71s_nand_b32 s2, s4, s6 72 73// CHECK: s_nand_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8c] 74s_nand_b64 s[2:3], s[4:5], s[6:7] 75 76// CHECK: s_nor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8d] 77s_nor_b32 s2, s4, s6 78 79// CHECK: s_nor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8d] 80s_nor_b64 s[2:3], s[4:5], s[6:7] 81 82// CHECK: s_xnor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8e] 83s_xnor_b32 s2, s4, s6 84 85// CHECK: s_xnor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8e] 86s_xnor_b64 s[2:3], s[4:5], s[6:7] 87 88// CHECK: s_lshl_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8f] 89s_lshl_b32 s2, s4, s6 90 91// CHECK: s_lshl_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x8f] 92s_lshl_b64 s[2:3], s[4:5], s6 93 94// CHECK: s_lshr_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x90] 95s_lshr_b32 s2, s4, s6 96 97// CHECK: s_lshr_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x90] 98s_lshr_b64 s[2:3], s[4:5], s6 99 100// CHECK: s_ashr_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x91] 101s_ashr_i32 s2, s4, s6 102 103// CHECK: s_ashr_i64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x91] 104s_ashr_i64 s[2:3], s[4:5], s6 105 106// CHECK: s_bfm_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x92] 107s_bfm_b32 s2, s4, s6 108 109// CHECK: s_bfm_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x92] 110s_bfm_b64 s[2:3], s[4:5], s[6:7] 111 112// CHECK: s_mul_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x93] 113s_mul_i32 s2, s4, s6 114 115// CHECK: s_bfe_u32 s2, s4, s6 ; encoding: [0x04,0x06,0x82,0x93] 116s_bfe_u32 s2, s4, s6 117 118// CHECK: s_bfe_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x94] 119s_bfe_i32 s2, s4, s6 120 121// CHECK: s_bfe_u64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x94] 122s_bfe_u64 s[2:3], s[4:5], s[6:7] 123 124// CHECK: s_bfe_i64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x02,0x95] 125s_bfe_i64 s[2:3], s[4:5], s6 126 127// CHECK: s_cbranch_g_fork s[4:5], s[6:7] ; encoding: [0x04,0x06,0x80,0x95] 128s_cbranch_g_fork s[4:5], s[6:7] 129 130// CHECK: s_absdiff_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x96] 131s_absdiff_i32 s2, s4, s6 132