1@ RUN: llvm-mc -triple armv8a-none-eabi -mattr=+fullfp16 -show-encoding < %s | FileCheck %s --check-prefix=ARM 2@ RUN: llvm-mc -triple armv8a-none-eabi -mattr=+fullfp16,+thumb-mode -show-encoding < %s | FileCheck %s --check-prefix=THUMB 3 4 vadd.f16 s0, s1, s0 5@ ARM: vadd.f16 s0, s1, s0 @ encoding: [0x80,0x09,0x30,0xee] 6@ THUMB: vadd.f16 s0, s1, s0 @ encoding: [0x30,0xee,0x80,0x09] 7 8 vsub.f16 s0, s1, s0 9@ ARM: vsub.f16 s0, s1, s0 @ encoding: [0xc0,0x09,0x30,0xee] 10@ THUMB: vsub.f16 s0, s1, s0 @ encoding: [0x30,0xee,0xc0,0x09] 11 12 vdiv.f16 s0, s1, s0 13@ ARM: vdiv.f16 s0, s1, s0 @ encoding: [0x80,0x09,0x80,0xee] 14@ THUMB: vdiv.f16 s0, s1, s0 @ encoding: [0x80,0xee,0x80,0x09] 15 16 vmul.f16 s0, s1, s0 17@ ARM: vmul.f16 s0, s1, s0 @ encoding: [0x80,0x09,0x20,0xee] 18@ THUMB: vmul.f16 s0, s1, s0 @ encoding: [0x20,0xee,0x80,0x09] 19 20 vnmul.f16 s0, s1, s0 21@ ARM: vnmul.f16 s0, s1, s0 @ encoding: [0xc0,0x09,0x20,0xee] 22@ THUMB: vnmul.f16 s0, s1, s0 @ encoding: [0x20,0xee,0xc0,0x09] 23 24 vmla.f16 s1, s2, s0 25@ ARM: vmla.f16 s1, s2, s0 @ encoding: [0x00,0x09,0x41,0xee] 26@ THUMB: vmla.f16 s1, s2, s0 @ encoding: [0x41,0xee,0x00,0x09] 27 28 vmls.f16 s1, s2, s0 29@ ARM: vmls.f16 s1, s2, s0 @ encoding: [0x40,0x09,0x41,0xee] 30@ THUMB: vmls.f16 s1, s2, s0 @ encoding: [0x41,0xee,0x40,0x09] 31 32 vnmla.f16 s1, s2, s0 33@ ARM: vnmla.f16 s1, s2, s0 @ encoding: [0x40,0x09,0x51,0xee] 34@ THUMB: vnmla.f16 s1, s2, s0 @ encoding: [0x51,0xee,0x40,0x09] 35 36 vnmls.f16 s1, s2, s0 37@ ARM: vnmls.f16 s1, s2, s0 @ encoding: [0x00,0x09,0x51,0xee] 38@ THUMB: vnmls.f16 s1, s2, s0 @ encoding: [0x51,0xee,0x00,0x09] 39 40 vcmp.f16 s0, s1 41@ ARM: vcmp.f16 s0, s1 @ encoding: [0x60,0x09,0xb4,0xee] 42@ THUMB: vcmp.f16 s0, s1 @ encoding: [0xb4,0xee,0x60,0x09] 43 44 vcmp.f16 s2, #0 45@ ARM: vcmp.f16 s2, #0 @ encoding: [0x40,0x19,0xb5,0xee] 46@ THUMB: vcmp.f16 s2, #0 @ encoding: [0xb5,0xee,0x40,0x19] 47 48 vcmpe.f16 s1, s0 49@ ARM: vcmpe.f16 s1, s0 @ encoding: [0xc0,0x09,0xf4,0xee] 50@ THUMB: vcmpe.f16 s1, s0 @ encoding: [0xf4,0xee,0xc0,0x09] 51 52 vcmpe.f16 s0, #0 53@ ARM: vcmpe.f16 s0, #0 @ encoding: [0xc0,0x09,0xb5,0xee] 54@ THUMB: vcmpe.f16 s0, #0 @ encoding: [0xb5,0xee,0xc0,0x09] 55 56 vabs.f16 s0, s0 57@ ARM: vabs.f16 s0, s0 @ encoding: [0xc0,0x09,0xb0,0xee] 58@ THUMB: vabs.f16 s0, s0 @ encoding: [0xb0,0xee,0xc0,0x09] 59 60 vneg.f16 s0, s0 61@ ARM: vneg.f16 s0, s0 @ encoding: [0x40,0x09,0xb1,0xee] 62@ THUMB: vneg.f16 s0, s0 @ encoding: [0xb1,0xee,0x40,0x09] 63 64 vsqrt.f16 s0, s0 65@ ARM: vsqrt.f16 s0, s0 @ encoding: [0xc0,0x09,0xb1,0xee] 66@ THUMB: vsqrt.f16 s0, s0 @ encoding: [0xb1,0xee,0xc0,0x09] 67 68 vcvt.f16.s32 s0, s0 69 vcvt.f16.u32 s0, s0 70 vcvt.s32.f16 s0, s0 71 vcvt.u32.f16 s0, s0 72@ ARM: vcvt.f16.s32 s0, s0 @ encoding: [0xc0,0x09,0xb8,0xee] 73@ ARM: vcvt.f16.u32 s0, s0 @ encoding: [0x40,0x09,0xb8,0xee] 74@ ARM: vcvt.s32.f16 s0, s0 @ encoding: [0xc0,0x09,0xbd,0xee] 75@ ARM: vcvt.u32.f16 s0, s0 @ encoding: [0xc0,0x09,0xbc,0xee] 76@ THUMB: vcvt.f16.s32 s0, s0 @ encoding: [0xb8,0xee,0xc0,0x09] 77@ THUMB: vcvt.f16.u32 s0, s0 @ encoding: [0xb8,0xee,0x40,0x09] 78@ THUMB: vcvt.s32.f16 s0, s0 @ encoding: [0xbd,0xee,0xc0,0x09] 79@ THUMB: vcvt.u32.f16 s0, s0 @ encoding: [0xbc,0xee,0xc0,0x09] 80 81 vcvtr.s32.f16 s0, s1 82 vcvtr.u32.f16 s0, s1 83@ ARM: vcvtr.s32.f16 s0, s1 @ encoding: [0x60,0x09,0xbd,0xee] 84@ ARM: vcvtr.u32.f16 s0, s1 @ encoding: [0x60,0x09,0xbc,0xee] 85@ THUMB: vcvtr.s32.f16 s0, s1 @ encoding: [0xbd,0xee,0x60,0x09] 86@ THUMB: vcvtr.u32.f16 s0, s1 @ encoding: [0xbc,0xee,0x60,0x09] 87 88 vcvt.f16.u32 s0, s0, #20 89 vcvt.f16.u16 s0, s0, #1 90 vcvt.f16.s32 s1, s1, #20 91 vcvt.f16.s16 s17, s17, #1 92 vcvt.u32.f16 s12, s12, #20 93 vcvt.u16.f16 s28, s28, #1 94 vcvt.s32.f16 s1, s1, #20 95 vcvt.s16.f16 s17, s17, #1 96@ ARM: vcvt.f16.u32 s0, s0, #20 @ encoding: [0xc6,0x09,0xbb,0xee] 97@ ARM: vcvt.f16.u16 s0, s0, #1 @ encoding: [0x67,0x09,0xbb,0xee] 98@ ARM: vcvt.f16.s32 s1, s1, #20 @ encoding: [0xc6,0x09,0xfa,0xee] 99@ ARM: vcvt.f16.s16 s17, s17, #1 @ encoding: [0x67,0x89,0xfa,0xee] 100@ ARM: vcvt.u32.f16 s12, s12, #20 @ encoding: [0xc6,0x69,0xbf,0xee] 101@ ARM: vcvt.u16.f16 s28, s28, #1 @ encoding: [0x67,0xe9,0xbf,0xee] 102@ ARM: vcvt.s32.f16 s1, s1, #20 @ encoding: [0xc6,0x09,0xfe,0xee] 103@ ARM: vcvt.s16.f16 s17, s17, #1 @ encoding: [0x67,0x89,0xfe,0xee] 104@ THUMB: vcvt.f16.u32 s0, s0, #20 @ encoding: [0xbb,0xee,0xc6,0x09] 105@ THUMB: vcvt.f16.u16 s0, s0, #1 @ encoding: [0xbb,0xee,0x67,0x09] 106@ THUMB: vcvt.f16.s32 s1, s1, #20 @ encoding: [0xfa,0xee,0xc6,0x09] 107@ THUMB: vcvt.f16.s16 s17, s17, #1 @ encoding: [0xfa,0xee,0x67,0x89] 108@ THUMB: vcvt.u32.f16 s12, s12, #20 @ encoding: [0xbf,0xee,0xc6,0x69] 109@ THUMB: vcvt.u16.f16 s28, s28, #1 @ encoding: [0xbf,0xee,0x67,0xe9] 110@ THUMB: vcvt.s32.f16 s1, s1, #20 @ encoding: [0xfe,0xee,0xc6,0x09] 111@ THUMB: vcvt.s16.f16 s17, s17, #1 @ encoding: [0xfe,0xee,0x67,0x89] 112 113 vcvta.s32.f16 s2, s3 114@ ARM: vcvta.s32.f16 s2, s3 @ encoding: [0xe1,0x19,0xbc,0xfe] 115@ THUMB: vcvta.s32.f16 s2, s3 @ encoding: [0xbc,0xfe,0xe1,0x19] 116 117 vcvtn.s32.f16 s6, s23 118@ ARM: vcvtn.s32.f16 s6, s23 @ encoding: [0xeb,0x39,0xbd,0xfe] 119@ THUMB: vcvtn.s32.f16 s6, s23 @ encoding: [0xbd,0xfe,0xeb,0x39] 120 121 vcvtp.s32.f16 s0, s4 122@ ARM: vcvtp.s32.f16 s0, s4 @ encoding: [0xc2,0x09,0xbe,0xfe] 123@ THUMB: vcvtp.s32.f16 s0, s4 @ encoding: [0xbe,0xfe,0xc2,0x09] 124 125 vcvtm.s32.f16 s17, s8 126@ ARM: vcvtm.s32.f16 s17, s8 @ encoding: [0xc4,0x89,0xff,0xfe] 127@ THUMB: vcvtm.s32.f16 s17, s8 @ encoding: [0xff,0xfe,0xc4,0x89] 128 129 vcvta.u32.f16 s2, s3 130@ ARM: vcvta.u32.f16 s2, s3 @ encoding: [0x61,0x19,0xbc,0xfe] 131@ THUMB: vcvta.u32.f16 s2, s3 @ encoding: [0xbc,0xfe,0x61,0x19] 132 133 vcvtn.u32.f16 s6, s23 134@ ARM: vcvtn.u32.f16 s6, s23 @ encoding: [0x6b,0x39,0xbd,0xfe] 135@ THUMB: vcvtn.u32.f16 s6, s23 @ encoding: [0xbd,0xfe,0x6b,0x39] 136 137 vcvtp.u32.f16 s0, s4 138@ ARM: vcvtp.u32.f16 s0, s4 @ encoding: [0x42,0x09,0xbe,0xfe] 139@ THUMB: vcvtp.u32.f16 s0, s4 @ encoding: [0xbe,0xfe,0x42,0x09] 140 141 vcvtm.u32.f16 s17, s8 142@ ARM: vcvtm.u32.f16 s17, s8 @ encoding: [0x44,0x89,0xff,0xfe] 143@ THUMB: vcvtm.u32.f16 s17, s8 @ encoding: [0xff,0xfe,0x44,0x89] 144 145 vselge.f16 s4, s1, s23 146@ ARM: vselge.f16 s4, s1, s23 @ encoding: [0xab,0x29,0x20,0xfe] 147@ THUMB: vselge.f16 s4, s1, s23 @ encoding: [0x20,0xfe,0xab,0x29] 148 149 vselgt.f16 s0, s1, s0 150@ ARM: vselgt.f16 s0, s1, s0 @ encoding: [0x80,0x09,0x30,0xfe] 151@ THUMB: vselgt.f16 s0, s1, s0 @ encoding: [0x30,0xfe,0x80,0x09] 152 153 vseleq.f16 s30, s28, s23 154@ ARM: vseleq.f16 s30, s28, s23 @ encoding: [0x2b,0xf9,0x0e,0xfe] 155@ THUMB: vseleq.f16 s30, s28, s23 @ encoding: [0x0e,0xfe,0x2b,0xf9] 156 157 vselvs.f16 s21, s16, s14 158@ ARM: vselvs.f16 s21, s16, s14 @ encoding: [0x07,0xa9,0x58,0xfe] 159@ THUMB: vselvs.f16 s21, s16, s14 @ encoding: [0x58,0xfe,0x07,0xa9] 160 161 vmaxnm.f16 s5, s12, s0 162@ ARM: vmaxnm.f16 s5, s12, s0 @ encoding: [0x00,0x29,0xc6,0xfe] 163@ THUMB: vmaxnm.f16 s5, s12, s0 @ encoding: [0xc6,0xfe,0x00,0x29] 164 165 vminnm.f16 s0, s0, s12 166@ ARM: vminnm.f16 s0, s0, s12 @ encoding: [0x46,0x09,0x80,0xfe] 167@ THUMB: vminnm.f16 s0, s0, s12 @ encoding: [0x80,0xfe,0x46,0x09] 168 169 vrintz.f16 s3, s24 170@ ARM: vrintz.f16 s3, s24 @ encoding: [0xcc,0x19,0xf6,0xee] 171@ THUMB: vrintz.f16 s3, s24 @ encoding: [0xf6,0xee,0xcc,0x19] 172 173 vrintr.f16 s0, s9 174@ ARM: vrintr.f16 s0, s9 @ encoding: [0x64,0x09,0xb6,0xee] 175@ THUMB: vrintr.f16 s0, s9 @ encoding: [0xb6,0xee,0x64,0x09] 176 177 vrintx.f16 s10, s14 178@ ARM: vrintx.f16 s10, s14 @ encoding: [0x47,0x59,0xb7,0xee] 179@ THUMB: vrintx.f16 s10, s14 @ encoding: [0xb7,0xee,0x47,0x59] 180 181 vrinta.f16 s12, s1 182@ ARM: vrinta.f16 s12, s1 @ encoding: [0x60,0x69,0xb8,0xfe] 183@ THUMB: vrinta.f16 s12, s1 @ encoding: [0xb8,0xfe,0x60,0x69] 184 185 vrintn.f16 s12, s1 186@ ARM: vrintn.f16 s12, s1 @ encoding: [0x60,0x69,0xb9,0xfe] 187@ THUMB: vrintn.f16 s12, s1 @ encoding: [0xb9,0xfe,0x60,0x69] 188 189 vrintp.f16 s12, s1 190@ ARM: vrintp.f16 s12, s1 @ encoding: [0x60,0x69,0xba,0xfe] 191@ THUMB: vrintp.f16 s12, s1 @ encoding: [0xba,0xfe,0x60,0x69] 192 193 vrintm.f16 s12, s1 194@ ARM: vrintm.f16 s12, s1 @ encoding: [0x60,0x69,0xbb,0xfe] 195@ THUMB: vrintm.f16 s12, s1 @ encoding: [0xbb,0xfe,0x60,0x69] 196 197 vfma.f16 s2, s7, s4 198@ ARM: vfma.f16 s2, s7, s4 @ encoding: [0x82,0x19,0xa3,0xee] 199@ THUMB: vfma.f16 s2, s7, s4 @ encoding: [0xa3,0xee,0x82,0x19] 200 201 vfms.f16 s2, s7, s4 202@ ARM: vfms.f16 s2, s7, s4 @ encoding: [0xc2,0x19,0xa3,0xee] 203@ THUMB: vfms.f16 s2, s7, s4 @ encoding: [0xa3,0xee,0xc2,0x19] 204 205 vfnma.f16 s2, s7, s4 206@ ARM: vfnma.f16 s2, s7, s4 @ encoding: [0xc2,0x19,0x93,0xee] 207@ THUMB: vfnma.f16 s2, s7, s4 @ encoding: [0x93,0xee,0xc2,0x19] 208 209 vfnms.f16 s2, s7, s4 210@ ARM: vfnms.f16 s2, s7, s4 @ encoding: [0x82,0x19,0x93,0xee] 211@ THUMB: vfnms.f16 s2, s7, s4 @ encoding: [0x93,0xee,0x82,0x19] 212 213 vmovx.f16 s2, s5 214 vins.f16 s2, s5 215@ ARM: vmovx.f16 s2, s5 @ encoding: [0x62,0x1a,0xb0,0xfe] 216@ ARM: vins.f16 s2, s5 @ encoding: [0xe2,0x1a,0xb0,0xfe] 217@ THUMB: vmovx.f16 s2, s5 @ encoding: [0xb0,0xfe,0x62,0x1a] 218@ THUMB: vins.f16 s2, s5 @ encoding: [0xb0,0xfe,0xe2,0x1a] 219 220 221 vldr.16 s1, [pc, #6] 222 vldr.16 s2, [pc, #510] 223 vldr.16 s3, [pc, #-510] 224 vldr.16 s4, [r4, #-18] 225@ ARM: vldr.16 s1, [pc, #6] @ encoding: [0x03,0x09,0xdf,0xed] 226@ ARM: vldr.16 s2, [pc, #510] @ encoding: [0xff,0x19,0x9f,0xed] 227@ ARM: vldr.16 s3, [pc, #-510] @ encoding: [0xff,0x19,0x5f,0xed] 228@ ARM: vldr.16 s4, [r4, #-18] @ encoding: [0x09,0x29,0x14,0xed] 229@ THUMB: vldr.16 s1, [pc, #6] @ encoding: [0xdf,0xed,0x03,0x09] 230@ THUMB: vldr.16 s2, [pc, #510] @ encoding: [0x9f,0xed,0xff,0x19] 231@ THUMB: vldr.16 s3, [pc, #-510] @ encoding: [0x5f,0xed,0xff,0x19] 232@ THUMB: vldr.16 s4, [r4, #-18] @ encoding: [0x14,0xed,0x09,0x29] 233 234 235 vstr.16 s1, [pc, #6] 236 vstr.16 s2, [pc, #510] 237 vstr.16 s3, [pc, #-510] 238 vstr.16 s4, [r4, #-18] 239@ ARM: vstr.16 s1, [pc, #6] @ encoding: [0x03,0x09,0xcf,0xed] 240@ ARM: vstr.16 s2, [pc, #510] @ encoding: [0xff,0x19,0x8f,0xed] 241@ ARM: vstr.16 s3, [pc, #-510] @ encoding: [0xff,0x19,0x4f,0xed] 242@ ARM: vstr.16 s4, [r4, #-18] @ encoding: [0x09,0x29,0x04,0xed] 243@ THUMB: vstr.16 s1, [pc, #6] @ encoding: [0xcf,0xed,0x03,0x09] 244@ THUMB: vstr.16 s2, [pc, #510] @ encoding: [0x8f,0xed,0xff,0x19] 245@ THUMB: vstr.16 s3, [pc, #-510] @ encoding: [0x4f,0xed,0xff,0x19] 246@ THUMB: vstr.16 s4, [r4, #-18] @ encoding: [0x04,0xed,0x09,0x29] 247 248 vmov.f16 s0, #1.0 249@ ARM: vmov.f16 s0, #1.000000e+00 @ encoding: [0x00,0x09,0xb7,0xee] 250@ THUMB: vmov.f16 s0, #1.000000e+00 @ encoding: [0xb7,0xee,0x00,0x09] 251 252 vmov.f16 s1, r2 253 vmov.f16 r3, s4 254@ ARM: vmov.f16 s1, r2 @ encoding: [0x90,0x29,0x00,0xee] 255@ ARM: vmov.f16 r3, s4 @ encoding: [0x10,0x39,0x12,0xee] 256@ THUMB: vmov.f16 s1, r2 @ encoding: [0x00,0xee,0x90,0x29] 257@ THUMB: vmov.f16 r3, s4 @ encoding: [0x12,0xee,0x10,0x39] 258