1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple=aarch64-none-linux-gnu -mattr=+neon -show-encoding < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker// Check that the assembler can handle the documented syntax for AArch64 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 7*9880d681SAndroid Build Coastguard Worker// Insert element (vector, from main) 8*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 9*9880d681SAndroid Build Coastguard Worker ins v2.b[2], w1 10*9880d681SAndroid Build Coastguard Worker ins v7.h[7], w14 11*9880d681SAndroid Build Coastguard Worker ins v20.s[0], w30 12*9880d681SAndroid Build Coastguard Worker ins v1.d[1], x7 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker mov v2.b[2], w1 15*9880d681SAndroid Build Coastguard Worker mov v7.h[7], w14 16*9880d681SAndroid Build Coastguard Worker mov v20.s[0], w30 17*9880d681SAndroid Build Coastguard Worker mov v1.d[1], x7 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v2.b[2], w1 // encoding: [0x22,0x1c,0x05,0x4e] 20*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v7.h[7], w14 // encoding: [0xc7,0x1d,0x1e,0x4e] 21*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v20.s[0], w30 // encoding: [0xd4,0x1f,0x04,0x4e] 22*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v1.d[1], x7 // encoding: [0xe1,0x1c,0x18,0x4e] 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v2.b[2], w1 // encoding: [0x22,0x1c,0x05,0x4e] 25*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v7.h[7], w14 // encoding: [0xc7,0x1d,0x1e,0x4e] 26*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v20.s[0], w30 // encoding: [0xd4,0x1f,0x04,0x4e] 27*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v1.d[1], x7 // encoding: [0xe1,0x1c,0x18,0x4e] 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 31*9880d681SAndroid Build Coastguard Worker// Signed integer move (main, from element) 32*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 33*9880d681SAndroid Build Coastguard Worker smov w1, v0.b[15] 34*9880d681SAndroid Build Coastguard Worker smov w14, v6.h[4] 35*9880d681SAndroid Build Coastguard Worker smov x1, v0.b[15] 36*9880d681SAndroid Build Coastguard Worker smov x14, v6.h[4] 37*9880d681SAndroid Build Coastguard Worker smov x20, v9.s[2] 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker// CHECK: smov w1, v0.b[15] // encoding: [0x01,0x2c,0x1f,0x0e] 40*9880d681SAndroid Build Coastguard Worker// CHECK: smov w14, v6.h[4] // encoding: [0xce,0x2c,0x12,0x0e] 41*9880d681SAndroid Build Coastguard Worker// CHECK: smov x1, v0.b[15] // encoding: [0x01,0x2c,0x1f,0x4e] 42*9880d681SAndroid Build Coastguard Worker// CHECK: smov x14, v6.h[4] // encoding: [0xce,0x2c,0x12,0x4e] 43*9880d681SAndroid Build Coastguard Worker// CHECK: smov x20, v9.s[2] // encoding: [0x34,0x2d,0x14,0x4e] 44*9880d681SAndroid Build Coastguard Worker 45*9880d681SAndroid Build Coastguard Worker 46*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 47*9880d681SAndroid Build Coastguard Worker// Unsigned integer move (main, from element) 48*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 49*9880d681SAndroid Build Coastguard Worker umov w1, v0.b[15] 50*9880d681SAndroid Build Coastguard Worker umov w14, v6.h[4] 51*9880d681SAndroid Build Coastguard Worker umov w20, v9.s[2] 52*9880d681SAndroid Build Coastguard Worker umov x7, v18.d[1] 53*9880d681SAndroid Build Coastguard Worker 54*9880d681SAndroid Build Coastguard Worker mov w20, v9.s[2] 55*9880d681SAndroid Build Coastguard Worker mov x7, v18.d[1] 56*9880d681SAndroid Build Coastguard Worker 57*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|umov}} w1, v0.b[15] // encoding: [0x01,0x3c,0x1f,0x0e] 58*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|umov}} w14, v6.h[4] // encoding: [0xce,0x3c,0x12,0x0e] 59*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|umov}} w20, v9.s[2] // encoding: [0x34,0x3d,0x14,0x0e] 60*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|umov}} x7, v18.d[1] // encoding: [0x47,0x3e,0x18,0x4e] 61*9880d681SAndroid Build Coastguard Worker 62*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|umov}} w20, v9.s[2] // encoding: [0x34,0x3d,0x14,0x0e] 63*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|umov}} x7, v18.d[1] // encoding: [0x47,0x3e,0x18,0x4e] 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 66*9880d681SAndroid Build Coastguard Worker// Insert element (vector, from element) 67*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 68*9880d681SAndroid Build Coastguard Worker 69*9880d681SAndroid Build Coastguard Worker ins v1.b[14], v3.b[6] 70*9880d681SAndroid Build Coastguard Worker ins v6.h[7], v7.h[5] 71*9880d681SAndroid Build Coastguard Worker ins v15.s[3], v22.s[2] 72*9880d681SAndroid Build Coastguard Worker ins v0.d[0], v4.d[1] 73*9880d681SAndroid Build Coastguard Worker 74*9880d681SAndroid Build Coastguard Worker mov v1.b[14], v3.b[6] 75*9880d681SAndroid Build Coastguard Worker mov v6.h[7], v7.h[5] 76*9880d681SAndroid Build Coastguard Worker mov v15.s[3], v22.s[2] 77*9880d681SAndroid Build Coastguard Worker mov v0.d[0], v4.d[1] 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v1.b[14], v3.b[6] // encoding: [0x61,0x34,0x1d,0x6e] 80*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v6.h[7], v7.h[5] // encoding: [0xe6,0x54,0x1e,0x6e] 81*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v15.s[3], v22.s[2] // encoding: [0xcf,0x46,0x1c,0x6e] 82*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v0.d[0], v4.d[1] // encoding: [0x80,0x44,0x08,0x6e] 83*9880d681SAndroid Build Coastguard Worker 84*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v1.b[14], v3.b[6] // encoding: [0x61,0x34,0x1d,0x6e] 85*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v6.h[7], v7.h[5] // encoding: [0xe6,0x54,0x1e,0x6e] 86*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v15.s[3], v22.s[2] // encoding: [0xcf,0x46,0x1c,0x6e] 87*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|ins}} v0.d[0], v4.d[1] // encoding: [0x80,0x44,0x08,0x6e] 88*9880d681SAndroid Build Coastguard Worker 89*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 90*9880d681SAndroid Build Coastguard Worker// Duplicate to all lanes( vector, from element) 91*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 92*9880d681SAndroid Build Coastguard Worker dup v1.8b, v2.b[2] 93*9880d681SAndroid Build Coastguard Worker dup v11.4h, v7.h[7] 94*9880d681SAndroid Build Coastguard Worker dup v17.2s, v20.s[0] 95*9880d681SAndroid Build Coastguard Worker dup v1.16b, v2.b[2] 96*9880d681SAndroid Build Coastguard Worker dup v11.8h, v7.h[7] 97*9880d681SAndroid Build Coastguard Worker dup v17.4s, v20.s[0] 98*9880d681SAndroid Build Coastguard Worker dup v5.2d, v1.d[1] 99*9880d681SAndroid Build Coastguard Worker 100*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v1.8b, v2.b[2] // encoding: [0x41,0x04,0x05,0x0e] 101*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v11.4h, v7.h[7] // encoding: [0xeb,0x04,0x1e,0x0e] 102*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v17.2s, v20.s[0] // encoding: [0x91,0x06,0x04,0x0e] 103*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v1.16b, v2.b[2] // encoding: [0x41,0x04,0x05,0x4e] 104*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v11.8h, v7.h[7] // encoding: [0xeb,0x04,0x1e,0x4e] 105*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v17.4s, v20.s[0] // encoding: [0x91,0x06,0x04,0x4e] 106*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v5.2d, v1.d[1] // encoding: [0x25,0x04,0x18,0x4e] 107*9880d681SAndroid Build Coastguard Worker 108*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 109*9880d681SAndroid Build Coastguard Worker// Duplicate to all lanes( vector, from main) 110*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 111*9880d681SAndroid Build Coastguard Worker dup v1.8b, w1 112*9880d681SAndroid Build Coastguard Worker dup v11.4h, w14 113*9880d681SAndroid Build Coastguard Worker dup v17.2s, w30 114*9880d681SAndroid Build Coastguard Worker dup v1.16b, w2 115*9880d681SAndroid Build Coastguard Worker dup v11.8h, w16 116*9880d681SAndroid Build Coastguard Worker dup v17.4s, w28 117*9880d681SAndroid Build Coastguard Worker dup v5.2d, x0 118*9880d681SAndroid Build Coastguard Worker 119*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v1.8b, w1 // encoding: [0x21,0x0c,0x01,0x0e] 120*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v11.4h, w14 // encoding: [0xcb,0x0d,0x02,0x0e] 121*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v17.2s, w30 // encoding: [0xd1,0x0f,0x04,0x0e] 122*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v1.16b, w2 // encoding: [0x41,0x0c,0x01,0x4e] 123*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v11.8h, w16 // encoding: [0x0b,0x0e,0x02,0x4e] 124*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v17.4s, w28 // encoding: [0x91,0x0f,0x04,0x4e] 125*9880d681SAndroid Build Coastguard Worker// CHECK: {{mov|dup}} v5.2d, x0 // encoding: [0x05,0x0c,0x08,0x4e] 126*9880d681SAndroid Build Coastguard Worker 127*9880d681SAndroid Build Coastguard Worker 128*9880d681SAndroid Build Coastguard Worker 129*9880d681SAndroid Build Coastguard Worker 130*9880d681SAndroid Build Coastguard Worker 131*9880d681SAndroid Build Coastguard Worker 132*9880d681SAndroid Build Coastguard Worker 133*9880d681SAndroid Build Coastguard Worker 134*9880d681SAndroid Build Coastguard Worker 135*9880d681SAndroid Build Coastguard Worker 136