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] 5 s_add_u32 s1, s2, s3 6 7 // CHECK: s_sub_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x80] 8 s_sub_u32 s1, s2, s3 9 10 // CHECK: s_add_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x81] 11 s_add_i32 s1, s2, s3 12 13 // CHECK: s_sub_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x81] 14 s_sub_i32 s1, s2, s3 15 16 // CHECK: s_addc_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x82] 17 s_addc_u32 s1, s2, s3 18 19 // CHECK: s_subb_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x82] 20 s_subb_u32 s1, s2, s3 21 22 // CHECK: s_min_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x83] 23 s_min_i32 s1, s2, s3 24 25 // CHECK: s_min_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x83] 26 s_min_u32 s1, s2, s3 27 28 // CHECK: s_max_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x84] 29 s_max_i32 s1, s2, s3 30 31 // CHECK: s_max_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x84] 32 s_max_u32 s1, s2, s3 33 34 // CHECK: s_cselect_b32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x85] 35 s_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] 38 s_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] 41 s_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] 44 s_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] 47 s_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] 50 s_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] 53 s_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] 56 s_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] 59 s_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] 62 s_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] 65 s_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] 68 s_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] 71 s_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] 74 s_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] 77 s_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] 80 s_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] 83 s_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] 86 s_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] 89 s_lshl_b32 s2, s4, s6 90 91 // CHECK: s_lshl_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x8f] 92 s_lshl_b64 s[2:3], s[4:5], s6 93 94 // CHECK: s_lshr_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x90] 95 s_lshr_b32 s2, s4, s6 96 97 // CHECK: s_lshr_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x90] 98 s_lshr_b64 s[2:3], s[4:5], s6 99 100 // CHECK: s_ashr_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x91] 101 s_ashr_i32 s2, s4, s6 102 103 // CHECK: s_ashr_i64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x91] 104 s_ashr_i64 s[2:3], s[4:5], s6 105 106 // CHECK: s_bfm_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x92] 107 s_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] 110 s_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] 113 s_mul_i32 s2, s4, s6 114 115 // CHECK: s_bfe_u32 s2, s4, s6 ; encoding: [0x04,0x06,0x82,0x93] 116 s_bfe_u32 s2, s4, s6 117 118 // CHECK: s_bfe_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x94] 119 s_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] 122 s_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] 125 s_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] 128 s_cbranch_g_fork s[4:5], s[6:7] 129 130 // CHECK: s_absdiff_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x96] 131 s_absdiff_i32 s2, s4, s6 132 133 // CHECK: s_add_u32 s101, s102, s103 ; encoding: [0x66,0x67,0x65,0x80] 134 s_add_u32 s101, s102, s103 135