1 // RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s 2 3 // Check that the assembler can handle the documented syntax for AArch64 4 5 6 //------------------------------------------------------------------------------ 7 // Vector Integer Add 8 //------------------------------------------------------------------------------ 9 add v0.8b, v1.8b, v2.8b 10 add v0.16b, v1.16b, v2.16b 11 add v0.4h, v1.4h, v2.4h 12 add v0.8h, v1.8h, v2.8h 13 add v0.2s, v1.2s, v2.2s 14 add v0.4s, v1.4s, v2.4s 15 add v0.2d, v1.2d, v2.2d 16 17 // CHECK: add v0.8b, v1.8b, v2.8b // encoding: [0x20,0x84,0x22,0x0e] 18 // CHECK: add v0.16b, v1.16b, v2.16b // encoding: [0x20,0x84,0x22,0x4e] 19 // CHECK: add v0.4h, v1.4h, v2.4h // encoding: [0x20,0x84,0x62,0x0e] 20 // CHECK: add v0.8h, v1.8h, v2.8h // encoding: [0x20,0x84,0x62,0x4e] 21 // CHECK: add v0.2s, v1.2s, v2.2s // encoding: [0x20,0x84,0xa2,0x0e] 22 // CHECK: add v0.4s, v1.4s, v2.4s // encoding: [0x20,0x84,0xa2,0x4e] 23 // CHECK: add v0.2d, v1.2d, v2.2d // encoding: [0x20,0x84,0xe2,0x4e] 24 25 //------------------------------------------------------------------------------ 26 // Vector Integer Sub 27 //------------------------------------------------------------------------------ 28 sub v0.8b, v1.8b, v2.8b 29 sub v0.16b, v1.16b, v2.16b 30 sub v0.4h, v1.4h, v2.4h 31 sub v0.8h, v1.8h, v2.8h 32 sub v0.2s, v1.2s, v2.2s 33 sub v0.4s, v1.4s, v2.4s 34 sub v0.2d, v1.2d, v2.2d 35 36 // CHECK: sub v0.8b, v1.8b, v2.8b // encoding: [0x20,0x84,0x22,0x2e] 37 // CHECK: sub v0.16b, v1.16b, v2.16b // encoding: [0x20,0x84,0x22,0x6e] 38 // CHECK: sub v0.4h, v1.4h, v2.4h // encoding: [0x20,0x84,0x62,0x2e] 39 // CHECK: sub v0.8h, v1.8h, v2.8h // encoding: [0x20,0x84,0x62,0x6e] 40 // CHECK: sub v0.2s, v1.2s, v2.2s // encoding: [0x20,0x84,0xa2,0x2e] 41 // CHECK: sub v0.4s, v1.4s, v2.4s // encoding: [0x20,0x84,0xa2,0x6e] 42 // CHECK: sub v0.2d, v1.2d, v2.2d // encoding: [0x20,0x84,0xe2,0x6e] 43 44 //------------------------------------------------------------------------------ 45 // Vector Floating-Point Add 46 //------------------------------------------------------------------------------ 47 fadd v0.4h, v1.4h, v2.4h 48 fadd v0.8h, v1.8h, v2.8h 49 fadd v0.2s, v1.2s, v2.2s 50 fadd v0.4s, v1.4s, v2.4s 51 fadd v0.2d, v1.2d, v2.2d 52 53 // CHECK: fadd v0.4h, v1.4h, v2.4h // encoding: [0x20,0x14,0x42,0x0e] 54 // CHECK: fadd v0.8h, v1.8h, v2.8h // encoding: [0x20,0x14,0x42,0x4e] 55 // CHECK: fadd v0.2s, v1.2s, v2.2s // encoding: [0x20,0xd4,0x22,0x0e] 56 // CHECK: fadd v0.4s, v1.4s, v2.4s // encoding: [0x20,0xd4,0x22,0x4e] 57 // CHECK: fadd v0.2d, v1.2d, v2.2d // encoding: [0x20,0xd4,0x62,0x4e] 58 59 60 //------------------------------------------------------------------------------ 61 // Vector Floating-Point Sub 62 //------------------------------------------------------------------------------ 63 fsub v0.4h, v1.4h, v2.4h 64 fsub v0.8h, v1.8h, v2.8h 65 fsub v0.2s, v1.2s, v2.2s 66 fsub v0.4s, v1.4s, v2.4s 67 fsub v0.2d, v1.2d, v2.2d 68 69 // CHECK: fsub v0.4h, v1.4h, v2.4h // encoding: [0x20,0x14,0xc2,0x0e] 70 // CHECK; fsub v0.8h, v1.8h, v2.8h // encoding: [0x20,0x14,0xc2,0x4e] 71 // CHECK: fsub v0.2s, v1.2s, v2.2s // encoding: [0x20,0xd4,0xa2,0x0e] 72 // CHECK: fsub v0.4s, v1.4s, v2.4s // encoding: [0x20,0xd4,0xa2,0x4e] 73 // CHECK: fsub v0.2d, v1.2d, v2.2d // encoding: [0x20,0xd4,0xe2,0x4e] 74 75 76 77