brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.3 KiB · a022c79 Raw
149 lines · plain
1# RUN: llvm-mc -triple=amdgcn -mcpu=gfx1010 -disassemble -show-encoding %s | FileCheck -check-prefix=GFX10 %s2 3#===----------------------------------------------------------------------===//4# Inline constants5#===----------------------------------------------------------------------===//6 7# GFX10: v_pk_add_f16 v1, 0, v2          ; encoding: [0x01,0x40,0x0f,0xcc,0x80,0x04,0x02,0x18]80x01,0x00,0x0f,0xcc,0x80,0x04,0x02,0x189 10# GFX10: v_pk_add_f16 v1, v2, 0          ; encoding: [0x01,0x40,0x0f,0xcc,0x02,0x01,0x01,0x18]110x01,0x00,0x0f,0xcc,0x02,0x01,0x01,0x1812 13# GFX10: v_pk_add_f16 v1, 1.0, v2        ; encoding: [0x01,0x40,0x0f,0xcc,0xf2,0x04,0x02,0x18]140x01,0x00,0x0f,0xcc,0xf2,0x04,0x02,0x1815 16# GFX10: v_pk_add_f16 v1, -1.0, v2       ; encoding: [0x01,0x40,0x0f,0xcc,0xf3,0x04,0x02,0x18]170x01,0x00,0x0f,0xcc,0xf3,0x04,0x02,0x1818 19# GFX10: v_pk_add_f16 v1, -0.5, v2       ; encoding: [0x01,0x40,0x0f,0xcc,0xf1,0x04,0x02,0x18]200x01,0x00,0x0f,0xcc,0xf1,0x04,0x02,0x1821 22# GFX10: v_pk_add_f16 v1, 0.5, v2        ; encoding: [0x01,0x40,0x0f,0xcc,0xf0,0x04,0x02,0x18]230x01,0x00,0x0f,0xcc,0xf0,0x04,0x02,0x1824 25# GFX10: v_pk_add_f16 v1, 2.0, v2        ; encoding: [0x01,0x40,0x0f,0xcc,0xf4,0x04,0x02,0x18]260x01,0x00,0x0f,0xcc,0xf4,0x04,0x02,0x1827 28# GFX10: v_pk_add_f16 v1, -2.0, v2       ; encoding: [0x01,0x40,0x0f,0xcc,0xf5,0x04,0x02,0x18]290x01,0x00,0x0f,0xcc,0xf5,0x04,0x02,0x1830 31# GFX10: v_pk_add_f16 v1, 4.0, v2        ; encoding: [0x01,0x40,0x0f,0xcc,0xf6,0x04,0x02,0x18]320x01,0x00,0x0f,0xcc,0xf6,0x04,0x02,0x1833 34# GFX10: v_pk_add_f16 v1, -4.0, v2       ; encoding: [0x01,0x40,0x0f,0xcc,0xf7,0x04,0x02,0x18]350x01,0x00,0x0f,0xcc,0xf7,0x04,0x02,0x1836 37# GFX10: v_pk_add_f16 v1, 0.15915494, v2 ; encoding: [0x01,0x40,0x0f,0xcc,0xf8,0x04,0x02,0x18]380x01,0x00,0x0f,0xcc,0xf8,0x04,0x02,0x1839 40# GFX10: v_pk_add_f16 v1, -1, v2         ; encoding: [0x01,0x40,0x0f,0xcc,0xc1,0x04,0x02,0x18]410x01,0x00,0x0f,0xcc,0xc1,0x04,0x02,0x1842 43# GFX10: v_pk_add_f16 v1, -2, v2         ; encoding: [0x01,0x40,0x0f,0xcc,0xc2,0x04,0x02,0x18]440x01,0x00,0x0f,0xcc,0xc2,0x04,0x02,0x1845 46# GFX10: v_pk_add_f16 v1, -3, v2         ; encoding: [0x01,0x40,0x0f,0xcc,0xc3,0x04,0x02,0x18]470x01,0x00,0x0f,0xcc,0xc3,0x04,0x02,0x1848 49# GFX10: v_pk_add_f16 v1, -16, v2        ; encoding: [0x01,0x40,0x0f,0xcc,0xd0,0x04,0x02,0x18]500x01,0x00,0x0f,0xcc,0xd0,0x04,0x02,0x1851 52# GFX10: v_pk_add_f16 v1, 1, v2          ; encoding: [0x01,0x40,0x0f,0xcc,0x81,0x04,0x02,0x18]530x01,0x00,0x0f,0xcc,0x81,0x04,0x02,0x1854 55# GFX10: v_pk_add_f16 v1, 2, v2          ; encoding: [0x01,0x40,0x0f,0xcc,0x82,0x04,0x02,0x18]560x01,0x00,0x0f,0xcc,0x82,0x04,0x02,0x1857 58# GFX10: v_pk_add_f16 v1, 3, v2          ; encoding: [0x01,0x40,0x0f,0xcc,0x83,0x04,0x02,0x18]590x01,0x00,0x0f,0xcc,0x83,0x04,0x02,0x1860 61# GFX10: v_pk_add_f16 v1, 4, v2          ; encoding: [0x01,0x40,0x0f,0xcc,0x84,0x04,0x02,0x18]620x01,0x00,0x0f,0xcc,0x84,0x04,0x02,0x1863 64# GFX10: v_pk_add_f16 v1, 15, v2         ; encoding: [0x01,0x40,0x0f,0xcc,0x8f,0x04,0x02,0x18]650x01,0x00,0x0f,0xcc,0x8f,0x04,0x02,0x1866 67# GFX10: v_pk_add_f16 v1, 16, v2         ; encoding: [0x01,0x40,0x0f,0xcc,0x90,0x04,0x02,0x18]680x01,0x00,0x0f,0xcc,0x90,0x04,0x02,0x1869 70# GFX10: v_pk_add_f16 v1, 63, v2         ; encoding: [0x01,0x40,0x0f,0xcc,0xbf,0x04,0x02,0x18]710x01,0x00,0x0f,0xcc,0xbf,0x04,0x02,0x1872 73# GFX10: v_pk_add_f16 v1, 64, v2         ; encoding: [0x01,0x40,0x0f,0xcc,0xc0,0x04,0x02,0x18]740x01,0x00,0x0f,0xcc,0xc0,0x04,0x02,0x1875 76# GFX10: v_pk_fma_f16 v5, 1.0, 2.0, 4.0  ; encoding: [0x05,0x40,0x0e,0xcc,0xf2,0xe8,0xd9,0x1b]770x05,0x40,0x0e,0xcc,0xf2,0xe8,0xd9,0x1b78 79# GFX10: v_pk_fma_f16 v5, -1, -2, -3     ; encoding: [0x05,0x40,0x0e,0xcc,0xc1,0x84,0x0d,0x1b]800x05,0x40,0x0e,0xcc,0xc1,0x84,0x0d,0x1b81 82# GFX10: v_pk_mad_i16 v5, 1.0, 2.0, 4.0  ; encoding: [0x05,0x40,0x00,0xcc,0xf2,0xe8,0xd9,0x1b]830x05,0x40,0x00,0xcc,0xf2,0xe8,0xd9,0x1b84 85# GFX10: v_pk_mad_u16 v5, -1, -2, -3     ; encoding: [0x05,0x40,0x09,0xcc,0xc1,0x84,0x0d,0x1b]860x05,0x40,0x09,0xcc,0xc1,0x84,0x0d,0x1b87 88# GFX10: v_pk_ashrrev_i16 v5, 1, 16      ; encoding: [0x05,0x40,0x06,0xcc,0x81,0x20,0x01,0x18]890x05,0x00,0x06,0xcc,0x81,0x20,0x01,0x1890 91#===----------------------------------------------------------------------===//92# 32-bit literals93#===----------------------------------------------------------------------===//94 95# GFX10: v_pk_add_f16 v5, v1, 0x12345678 ; encoding: [0x05,0x40,0x0f,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12]960x05,0x00,0x0f,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x1297 98# GFX10: v_pk_add_f16 v5, 0x12345678, v2 ; encoding: [0x05,0x40,0x0f,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12]990x05,0x00,0x0f,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12100 101# GFX10: v_pk_add_f16 v5, 0xffffff00, v2 ; encoding: [0x05,0x40,0x0f,0xcc,0xff,0x04,0x02,0x18,0x00,0xff,0xff,0xff]1020x05,0x00,0x0f,0xcc,0xff,0x04,0x02,0x18,0x00,0xff,0xff,0xff103 104# GFX10: v_pk_add_f16 v5, v1, 0x100 ; encoding: [0x05,0x40,0x0f,0xcc,0x01,0xff,0x01,0x18,0x00,0x01,0x00,0x00]1050x05,0x00,0x0f,0xcc,0x01,0xff,0x01,0x18,0x00,0x01,0x00,0x00106 107# GFX10: v_pk_add_u16 v5, v1, 0x12345678 ; encoding: [0x05,0x40,0x0a,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12]1080x05,0x00,0x0a,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12109 110# GFX10: v_pk_add_u16 v5, 0x12345678, v2 ; encoding: [0x05,0x40,0x0a,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12]1110x05,0x00,0x0a,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12112 113# GFX10: v_pk_add_u16 v5, 0xffffff00, v2 ; encoding: [0x05,0x40,0x0a,0xcc,0xff,0x04,0x02,0x18,0x00,0xff,0xff,0xff]1140x05,0x00,0x0a,0xcc,0xff,0x04,0x02,0x18,0x00,0xff,0xff,0xff115 116# GFX10: v_pk_add_u16 v5, v1, 0x100 ; encoding: [0x05,0x40,0x0a,0xcc,0x01,0xff,0x01,0x18,0x00,0x01,0x00,0x00]1170x05,0x00,0x0a,0xcc,0x01,0xff,0x01,0x18,0x00,0x01,0x00,0x00118 119# GFX10: v_pk_fma_f16 v5, 0xaf123456, v2, v3 ; encoding: [0x05,0x40,0x0e,0xcc,0xff,0x04,0x0e,0x1c,0x56,0x34,0x12,0xaf]1200x05,0x40,0x0e,0xcc,0xff,0x04,0x0e,0x1c,0x56,0x34,0x12,0xaf121 122# GFX10: v_pk_fma_f16 v5, v1, 0xaf123456, v3 ; encoding: [0x05,0x40,0x0e,0xcc,0x01,0xff,0x0d,0x1c,0x56,0x34,0x12,0xaf]1230x05,0x40,0x0e,0xcc,0x01,0xff,0x0d,0x1c,0x56,0x34,0x12,0xaf124 125# GFX10: v_pk_fma_f16 v5, v1, v2, 0xaf123456 ; encoding: [0x05,0x40,0x0e,0xcc,0x01,0x05,0xfe,0x1b,0x56,0x34,0x12,0xaf]1260x05,0x40,0x0e,0xcc,0x01,0x05,0xfe,0x1b,0x56,0x34,0x12,0xaf127 128# GFX10: v_pk_mad_i16 v5, 0xaf123456, v2, v3 ; encoding: [0x05,0x40,0x00,0xcc,0xff,0x04,0x0e,0x1c,0x56,0x34,0x12,0xaf]1290x05,0x40,0x00,0xcc,0xff,0x04,0x0e,0x1c,0x56,0x34,0x12,0xaf130 131# GFX10: v_pk_mad_i16 v5, v1, 0xaf123456, v3 ; encoding: [0x05,0x40,0x00,0xcc,0x01,0xff,0x0d,0x1c,0x56,0x34,0x12,0xaf]1320x05,0x40,0x00,0xcc,0x01,0xff,0x0d,0x1c,0x56,0x34,0x12,0xaf133 134# GFX10: v_pk_mad_i16 v5, v1, v2, 0xaf123456 ; encoding: [0x05,0x40,0x00,0xcc,0x01,0x05,0xfe,0x1b,0x56,0x34,0x12,0xaf]1350x05,0x40,0x00,0xcc,0x01,0x05,0xfe,0x1b,0x56,0x34,0x12,0xaf136 137# GFX10: v_pk_ashrrev_i16 v5, 0x12345678, v2 ; encoding: [0x05,0x40,0x06,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12]1380x05,0x00,0x06,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12139 140# GFX10: v_pk_ashrrev_i16 v5, v1, 0x12345678 ; encoding: [0x05,0x40,0x06,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12]1410x05,0x00,0x06,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12142 143#===----------------------------------------------------------------------===//144# Packed VOP2145#===----------------------------------------------------------------------===//146 147# GFX10: v_pk_fmac_f16 v5, 0x12345678, v2 ; encoding: [0xff,0x04,0x0a,0x78,0x78,0x56,0x34,0x12]1480xff,0x04,0x0a,0x78,0x78,0x56,0x34,0x12149