Home | History | Annotate | Download | only in AMDGPU
      1 # RUN: llvm-mc -arch=amdgcn -mcpu=tonga -disassemble -show-encoding < %s | FileCheck %s
      2 
      3 # CHECK: v_nop              ; encoding: [0x00,0x00,0x00,0x7e]
      4 0x00 0x00 0x00 0x7e
      5 
      6 # CHECK: v_clrexcp                       ; encoding: [0x00,0x6a,0x00,0x7e]
      7 0x00 0x6a 0x00 0x7e
      8 
      9 # CHECK: v_mov_b32_e32 v2, v1         ; encoding: [0x01,0x03,0x04,0x7e]
     10 0x01 0x03 0x04 0x7e
     11 
     12 # CHECK: v_mov_b32_e32 v1, 0.5         ; encoding: [0xf0,0x02,0x02,0x7e]
     13 0xf0 0x02 0x02 0x7e
     14 
     15 # CHECK: v_mov_b32_e32 v15, s100         ; encoding: [0x64,0x02,0x1e,0x7e]
     16 0x64 0x02 0x1e 0x7e
     17 
     18 # CHECK: v_mov_b32_e32 v90, flat_scratch_lo         ; encoding: [0x66,0x02,0xb4,0x7e]
     19 0x66 0x02 0xb4 0x7e
     20 
     21 # CHECK: v_mov_b32_e32 v150, vcc_lo         ; encoding: [0x6a,0x02,0x2c,0x7f]
     22 0x6a 0x02 0x2c 0x7f
     23 
     24 # CHECK: v_mov_b32_e32 v199, exec_lo         ; encoding: [0x7e,0x02,0x8e,0x7f]
     25 0x7e 0x02 0x8e 0x7f
     26 
     27 # CHECK: v_mov_b32_e32 v222, m0         ; encoding: [0x7c,0x02,0xbc,0x7f]
     28 0x7c 0x02 0xbc 0x7f
     29 
     30 # CHECK: v_mov_b32_e32 v255, -13         ; encoding: [0xcd,0x02,0xfe,0x7f]
     31 0xcd 0x02 0xfe 0x7f
     32 
     33 # CHECK: v_cvt_f32_i32_e32 v153, s98         ; encoding: [0x62,0x0a,0x32,0x7f]
     34 0x62 0x0a 0x32 0x7f
     35 
     36 # CHECK: v_cvt_f32_u32_e32 v33, -4.0         ; encoding: [0xf7,0x0c,0x42,0x7e]
     37 0xf7 0x0c 0x42 0x7e
     38 
     39 # CHECK: v_cvt_i32_f64_e32 v2, s[0:1]         ; encoding: [0x00,0x06,0x04,0x7e]
     40 0x00 0x06 0x04 0x7e
     41 
     42 # CHECK: v_cvt_u32_f32_e32 v123, vcc_hi  ; encoding: [0x6b,0x0e,0xf6,0x7e]
     43 0x6b 0x0e 0xf6 0x7e
     44 
     45 # CHECK: v_cvt_i32_f32_e32 v123, flat_scratch_lo ; encoding: [0x66,0x10,0xf6,0x7e]
     46 0x66 0x10 0xf6 0x7e
     47 
     48 # CHECK: v_cvt_rpi_i32_f32_e32 v123, s101 ; encoding: [0x65,0x18,0xf6,0x7e]
     49 0x65 0x18 0xf6 0x7e
     50 
     51 # CHECK: v_cvt_flr_i32_f32_e32 v123, -4.0 ; encoding: [0xf7,0x1a,0xf6,0x7e]
     52 0xf7 0x1a 0xf6 0x7e
     53 
     54 # CHECK: v_cvt_f32_f64_e32 v123, vcc      ; encoding: [0x6a,0x1e,0xf6,0x7e]
     55 0x6a 0x1e 0xf6 0x7e
     56 
     57 # CHECK: v_cvt_u32_f64_e32 v123, exec      ; encoding: [0x7e,0x2a,0xf6,0x7e]
     58 0x7e 0x2a 0xf6 0x7e
     59 
     60 # CHECK: v_fract_f32_e32 v123, m0        ; encoding: [0x7c,0x36,0xf6,0x7e]
     61 0x7c 0x36 0xf6 0x7e
     62 
     63 # CHECK: v_trunc_f32_e32 v123, exec_lo   ; encoding: [0x7e,0x38,0xf6,0x7e]
     64 0x7e 0x38 0xf6 0x7e
     65 
     66 # CHECK: v_ceil_f32_e32 v123, exec_hi    ; encoding: [0x7f,0x3a,0xf6,0x7e]
     67 0x7f 0x3a 0xf6 0x7e
     68 
     69 # CHECK: v_rndne_f32_e32 v123, 0         ; encoding: [0x80,0x3c,0xf6,0x7e]
     70 0x80 0x3c 0xf6 0x7e
     71 
     72 # CHECK: v_floor_f32_e32 v123, -0.5      ; encoding: [0xf1,0x3e,0xf6,0x7e]
     73 0xf1 0x3e 0xf6 0x7e
     74 
     75 # CHECK: v_exp_f32_e32 v123, 1.0         ; encoding: [0xf2,0x40,0xf6,0x7e]
     76 0xf2 0x40 0xf6 0x7e
     77 
     78 # CHECK: v_log_f32_e32 v123, -1.0        ; encoding: [0xf3,0x42,0xf6,0x7e]
     79 0xf3 0x42 0xf6 0x7e
     80 
     81 # CHECK: v_rcp_f32_e32 v123, 2.0         ; encoding: [0xf4,0x44,0xf6,0x7e]
     82 0xf4 0x44 0xf6 0x7e
     83 
     84 # CHECK: v_rcp_iflag_f32_e32 v123, -2.0  ; encoding: [0xf5,0x46,0xf6,0x7e]
     85 0xf5 0x46 0xf6 0x7e
     86 
     87 # CHECK: v_rsq_f32_e32 v123, 4.0         ; encoding: [0xf6,0x48,0xf6,0x7e]
     88 0xf6 0x48 0xf6 0x7e
     89 
     90 # CHECK: v_sqrt_f32_e32 v123, v12        ; encoding: [0x0c,0x4f,0xf6,0x7e]
     91 0x0c 0x4f 0xf6 0x7e
     92 
     93 # CHECK: v_sin_f32_e32 v123, v12         ; encoding: [0x0c,0x53,0xf6,0x7e]
     94 0x0c 0x53 0xf6 0x7e
     95 
     96 # CHECK: v_cos_f32_e32 v123, v12         ; encoding: [0x0c,0x55,0xf6,0x7e]
     97 0x0c 0x55 0xf6 0x7e
     98 
     99 # CHECK: v_not_b32_e32 v123, v12         ; encoding: [0x0c,0x57,0xf6,0x7e]
    100 0x0c 0x57 0xf6 0x7e
    101 
    102 # CHECK: v_bfrev_b32_e32 v123, v12       ; encoding: [0x0c,0x59,0xf6,0x7e]
    103 0x0c 0x59 0xf6 0x7e
    104 
    105 # CHECK: v_ffbh_u32_e32 v123, v12        ; encoding: [0x0c,0x5b,0xf6,0x7e]
    106 0x0c 0x5b 0xf6 0x7e
    107 
    108 # CHECK: v_ffbl_b32_e32 v123, v12        ; encoding: [0x0c,0x5d,0xf6,0x7e]
    109 0x0c 0x5d 0xf6 0x7e
    110 
    111 # CHECK: v_ffbh_i32_e32 v123, v12        ; encoding: [0x0c,0x5f,0xf6,0x7e]
    112 0x0c 0x5f 0xf6 0x7e
    113 
    114 # CHECK: v_frexp_exp_i32_f64_e32 v123, 2.0 ; encoding: [0xf4,0x60,0xf6,0x7e]
    115 0xf4 0x60 0xf6 0x7e
    116 
    117 # CHECK: v_frexp_exp_i32_f32_e32 v123, s33 ; encoding: [0x21,0x66,0xf6,0x7e]
    118 0x21 0x66 0xf6 0x7e
    119 
    120 # CHECK: v_frexp_mant_f32_e32 v123, s33  ; encoding: [0x21,0x68,0xf6,0x7e]
    121 0x21 0x68 0xf6 0x7e
    122 
    123 # CHECK: v_movreld_b32_e32 v123, s33     ; encoding: [0x21,0x6c,0xf6,0x7e]
    124 0x21 0x6c 0xf6 0x7e
    125 
    126 # CHECK: v_movrels_b32_e32 v123, s33     ; encoding: [0x21,0x6e,0xf6,0x7e]
    127 0x21 0x6e 0xf6 0x7e
    128 
    129 # CHECK: v_movrelsd_b32_e32 v123, s33    ; encoding: [0x21,0x70,0xf6,0x7e]
    130 0x21 0x70 0xf6 0x7e
    131 
    132 # CHECK: v_cvt_f16_f32_e32 v123, flat_scratch_hi ; encoding: [0x67,0x14,0xf6,0x7e]
    133 0x67 0x14 0xf6 0x7e
    134 
    135 # CHECK: v_cvt_f32_f16_e32 v123, s55     ; encoding: [0x37,0x16,0xf6,0x7e]
    136 0x37 0x16 0xf6 0x7e
    137 
    138 # CHECK: v_cvt_off_f32_i4_e32 v123, v12  ; encoding: [0x0c,0x1d,0xf6,0x7e]
    139 0x0c 0x1d 0xf6 0x7e
    140 
    141 # CHECK: v_cvt_f32_ubyte0_e32 v123, v12  ; encoding: [0x0c,0x23,0xf6,0x7e]
    142 0x0c 0x23 0xf6 0x7e
    143 
    144 # CHECK: v_cvt_f32_ubyte1_e32 v123, v12  ; encoding: [0x0c,0x25,0xf6,0x7e]
    145 0x0c 0x25 0xf6 0x7e
    146 
    147 # CHECK: v_cvt_f32_ubyte2_e32 v123, v12  ; encoding: [0x0c,0x27,0xf6,0x7e]
    148 0x0c 0x27 0xf6 0x7e
    149 
    150 # CHECK: v_cvt_f32_ubyte3_e32 v123, v12  ; encoding: [0x0c,0x29,0xf6,0x7e]
    151 0x0c 0x29 0xf6 0x7e
    152 
    153 # CHECK: v_cvt_f64_i32_e32 v[222:223], 1.0 ; encoding: [0xf2,0x08,0xbc,0x7f]
    154 0xf2 0x08 0xbc 0x7f
    155 
    156 # CHECK: v_cvt_f64_i32_e32 v[222:223], exec_hi ; encoding: [0x7f,0x08,0xbc,0x7f]
    157 0x7f 0x08 0xbc 0x7f
    158 
    159 # CHECK: v_cvt_f64_f32_e32 v[222:223], s33 ; encoding: [0x21,0x20,0xbc,0x7f]
    160 0x21 0x20 0xbc 0x7f
    161 
    162 # CHECK: v_cvt_f64_u32_e32 v[222:223], s33 ; encoding: [0x21,0x2c,0xbc,0x7f]
    163 0x21 0x2c 0xbc 0x7f
    164 
    165 # CHECK: v_rcp_f64_e32 v[222:223], s[22:23] ; encoding: [0x16,0x4a,0xbc,0x7f]
    166 0x16 0x4a 0xbc 0x7f
    167 
    168 # CHECK: v_rsq_f64_e32 v[222:223], s[22:23] ; encoding: [0x16,0x4c,0xbc,0x7f]
    169 0x16 0x4c 0xbc 0x7f
    170 
    171 # CHECK: v_sqrt_f64_e32 v[222:223], s[22:23] ; encoding: [0x16,0x50,0xbc,0x7f]
    172 0x16 0x50 0xbc 0x7f
    173 
    174 # CHECK: v_frexp_mant_f64_e32 v[222:223], s[22:23] ; encoding: [0x16,0x62,0xbc,0x7f]
    175 0x16 0x62 0xbc 0x7f
    176 
    177 # CHECK: v_fract_f64_e32 v[222:223], s[22:23] ; encoding: [0x16,0x64,0xbc,0x7f]
    178 0x16 0x64 0xbc 0x7f
    179 
    180 # CHECK: v_cvt_f16_u16_e32 v123, 23      ; encoding: [0x97,0x72,0xf6,0x7e]
    181 0x97 0x72 0xf6 0x7e
    182 
    183 # CHECK: v_cvt_f16_i16_e32 v123, vcc_hi  ; encoding: [0x6b,0x74,0xf6,0x7e]
    184 0x6b 0x74 0xf6 0x7e
    185 
    186 # CHECK: v_cvt_u16_f16_e32 v123, m0      ; encoding: [0x7c,0x76,0xf6,0x7e]
    187 0x7c 0x76 0xf6 0x7e
    188 
    189 # CHECK: v_cvt_i16_f16_e32 v123, exec_lo ; encoding: [0x7e,0x78,0xf6,0x7e]
    190 0x7e 0x78 0xf6 0x7e
    191 
    192 # CHECK: v_rcp_f16_e32 v123, 1.0         ; encoding: [0xf2,0x7a,0xf6,0x7e]
    193 0xf2 0x7a 0xf6 0x7e
    194 
    195 # CHECK: v_sqrt_f16_e32 v123, 4.0        ; encoding: [0xf6,0x7c,0xf6,0x7e]
    196 0xf6 0x7c 0xf6 0x7e
    197 
    198 # CHECK: v_rsq_f16_e32 v123, -1.0        ; encoding: [0xf3,0x7e,0xf6,0x7e]
    199 0xf3 0x7e 0xf6 0x7e
    200 
    201 # CHECK: v_log_f16_e32 v123, s33         ; encoding: [0x21,0x80,0xf6,0x7e]
    202 0x21 0x80 0xf6 0x7e
    203 
    204 # CHECK: v_exp_f16_e32 v123, v12         ; encoding: [0x0c,0x83,0xf6,0x7e]
    205 0x0c 0x83 0xf6 0x7e
    206 
    207 # CHECK: v_frexp_mant_f16_e32 v123, v12  ; encoding: [0x0c,0x85,0xf6,0x7e]
    208 0x0c 0x85 0xf6 0x7e
    209 
    210 # CHECK: v_frexp_exp_i16_f16_e32 v123, v12 ; encoding: [0x0c,0x87,0xf6,0x7e]
    211 0x0c 0x87 0xf6 0x7e
    212 
    213 # CHECK: v_floor_f16_e32 v123, v12       ; encoding: [0x0c,0x89,0xf6,0x7e]
    214 0x0c 0x89 0xf6 0x7e
    215 
    216 # CHECK: v_ceil_f16_e32 v123, v12        ; encoding: [0x0c,0x8b,0xf6,0x7e]
    217 0x0c 0x8b 0xf6 0x7e
    218 
    219 # CHECK: v_trunc_f16_e32 v123, s33       ; encoding: [0x21,0x8c,0xf6,0x7e]
    220 0x21 0x8c 0xf6 0x7e
    221 
    222 # CHECK: v_rndne_f16_e32 v123, s33       ; encoding: [0x21,0x8e,0xf6,0x7e]
    223 0x21 0x8e 0xf6 0x7e
    224 
    225 # CHECK: v_fract_f16_e32 v123, s33       ; encoding: [0x21,0x90,0xf6,0x7e]
    226 0x21 0x90 0xf6 0x7e
    227 
    228 # CHECK: v_sin_f16_e32 v123, s33         ; encoding: [0x21,0x92,0xf6,0x7e]
    229 0x21 0x92 0xf6 0x7e
    230 
    231 # CHECK: v_cos_f16_e32 v123, s33         ; encoding: [0x21,0x94,0xf6,0x7e]
    232 0x21 0x94 0xf6 0x7e
    233 
    234 # CHECK: v_mov_b32_e32 v2, 0x75bcd15     ; encoding: [0xff,0x02,0x04,0x7e,0x15,0xcd,0x5b,0x07]
    235 0xff 0x02 0x04 0x7e 0x15 0xcd 0x5b 0x07
    236 
    237 # CHECK: v_cvt_f32_u32_e32 v33, 0x4236b732 ; encoding: [0xff,0x0c,0x42,0x7e,0x32,0xb7,0x36,0x42]
    238 0xff 0x0c 0x42 0x7e 0x32 0xb7 0x36 0x42
    239 
    240 # CHECK: v_cvt_i32_f64_e32 v2, 0x4236b732 ; encoding: [0xff,0x06,0x04,0x7e,0x32,0xb7,0x36,0x42]
    241 0xff 0x06 0x04 0x7e 0x32 0xb7 0x36 0x42
    242 
    243 # CHECK: v_cvt_f16_u16_e32 v123, 0x3ade68b1 ; encoding: [0xff,0x72,0xf6,0x7e,0xb1,0x68,0xde,0x3a]
    244 0xff 0x72 0xf6 0x7e 0xb1 0x68 0xde 0x3a
    245 
    246 # CHECK: v_cvt_f16_i16_e32 v123, 0x21c2  ; encoding: [0xff,0x74,0xf6,0x7e,0xc2,0x21,0x00,0x00]
    247 0xff 0x74 0xf6 0x7e 0xc2 0x21 0x00 0x00
    248 
    249 # CHECK: v_cvt_u16_f16_e32 v123, 0x3f200000 ; encoding: [0xff,0x76,0xf6,0x7e,0x00,0x00,0x20,0x3f]
    250 0xff 0x76 0xf6 0x7e 0x00 0x00 0x20 0x3f