81 lines · plain
1// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s2 3// Check that the assembler can handle the documented syntax for AArch644 5//----------------------------------------------------------------------6// Vector Absolute Difference and Accumulate (Signed, Unsigned)7//----------------------------------------------------------------------8 uaba v0.8b, v1.8b, v2.8b9 uaba v0.16b, v1.16b, v2.16b10 uaba v0.4h, v1.4h, v2.4h11 uaba v0.8h, v1.8h, v2.8h12 uaba v0.2s, v1.2s, v2.2s13 uaba v0.4s, v1.4s, v2.4s14 15// CHECK: uaba v0.8b, v1.8b, v2.8b // encoding: [0x20,0x7c,0x22,0x2e]16// CHECK: uaba v0.16b, v1.16b, v2.16b // encoding: [0x20,0x7c,0x22,0x6e]17// CHECK: uaba v0.4h, v1.4h, v2.4h // encoding: [0x20,0x7c,0x62,0x2e]18// CHECK: uaba v0.8h, v1.8h, v2.8h // encoding: [0x20,0x7c,0x62,0x6e]19// CHECK: uaba v0.2s, v1.2s, v2.2s // encoding: [0x20,0x7c,0xa2,0x2e]20// CHECK: uaba v0.4s, v1.4s, v2.4s // encoding: [0x20,0x7c,0xa2,0x6e]21 22 23 saba v0.8b, v1.8b, v2.8b24 saba v0.16b, v1.16b, v2.16b25 saba v0.4h, v1.4h, v2.4h26 saba v0.8h, v1.8h, v2.8h27 saba v0.2s, v1.2s, v2.2s28 saba v0.4s, v1.4s, v2.4s29 30// CHECK: saba v0.8b, v1.8b, v2.8b // encoding: [0x20,0x7c,0x22,0x0e]31// CHECK: saba v0.16b, v1.16b, v2.16b // encoding: [0x20,0x7c,0x22,0x4e]32// CHECK: saba v0.4h, v1.4h, v2.4h // encoding: [0x20,0x7c,0x62,0x0e]33// CHECK: saba v0.8h, v1.8h, v2.8h // encoding: [0x20,0x7c,0x62,0x4e]34// CHECK: saba v0.2s, v1.2s, v2.2s // encoding: [0x20,0x7c,0xa2,0x0e]35// CHECK: saba v0.4s, v1.4s, v2.4s // encoding: [0x20,0x7c,0xa2,0x4e]36 37//----------------------------------------------------------------------38// Vector Absolute Difference (Signed, Unsigned)39//----------------------------------------------------------------------40 uabd v0.8b, v1.8b, v2.8b41 uabd v0.16b, v1.16b, v2.16b42 uabd v0.4h, v1.4h, v2.4h43 uabd v0.8h, v1.8h, v2.8h44 uabd v0.2s, v1.2s, v2.2s45 uabd v0.4s, v1.4s, v2.4s46 47// CHECK: uabd v0.8b, v1.8b, v2.8b // encoding: [0x20,0x74,0x22,0x2e]48// CHECK: uabd v0.16b, v1.16b, v2.16b // encoding: [0x20,0x74,0x22,0x6e]49// CHECK: uabd v0.4h, v1.4h, v2.4h // encoding: [0x20,0x74,0x62,0x2e]50// CHECK: uabd v0.8h, v1.8h, v2.8h // encoding: [0x20,0x74,0x62,0x6e]51// CHECK: uabd v0.2s, v1.2s, v2.2s // encoding: [0x20,0x74,0xa2,0x2e]52// CHECK: uabd v0.4s, v1.4s, v2.4s // encoding: [0x20,0x74,0xa2,0x6e]53 54 sabd v0.8b, v1.8b, v2.8b55 sabd v0.16b, v1.16b, v2.16b56 sabd v0.4h, v1.4h, v2.4h57 sabd v0.8h, v1.8h, v2.8h58 sabd v0.2s, v1.2s, v2.2s59 sabd v0.4s, v1.4s, v2.4s60 61// CHECK: sabd v0.8b, v1.8b, v2.8b // encoding: [0x20,0x74,0x22,0x0e]62// CHECK: sabd v0.16b, v1.16b, v2.16b // encoding: [0x20,0x74,0x22,0x4e]63// CHECK: sabd v0.4h, v1.4h, v2.4h // encoding: [0x20,0x74,0x62,0x0e]64// CHECK: sabd v0.8h, v1.8h, v2.8h // encoding: [0x20,0x74,0x62,0x4e]65// CHECK: sabd v0.2s, v1.2s, v2.2s // encoding: [0x20,0x74,0xa2,0x0e]66// CHECK: sabd v0.4s, v1.4s, v2.4s // encoding: [0x20,0x74,0xa2,0x4e]67 68//----------------------------------------------------------------------69// Vector Absolute Difference (Floating Point)70//----------------------------------------------------------------------71 fabd v0.4h, v1.4h, v2.4h72 fabd v0.2s, v1.2s, v2.2s73 fabd v31.4s, v15.4s, v16.4s74 fabd v7.2d, v8.2d, v25.2d75 76// CHECK: fabd v0.4h, v1.4h, v2.4h // encoding: [0x20,0x14,0xc2,0x2e]77// CHECK: fabd v0.2s, v1.2s, v2.2s // encoding: [0x20,0xd4,0xa2,0x2e]78// CHECK: fabd v31.4s, v15.4s, v16.4s // encoding: [0xff,0xd5,0xb0,0x6e]79// CHECK: fabd v7.2d, v8.2d, v25.2d // encoding: [0x07,0xd5,0xf9,0x6e]80 81