// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a -o - %s | FileCheck %s
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=-v8.4a,+rcpc-immo -o - %s 2>&1 | FileCheck %s
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a,-rcpc-immo -o - %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-V84
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=-v8.4a -o - %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-V84
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -o - %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-V84
//------------------------------------------------------------------------------
// Armv8.4-A LDAPR and STLR instructions with immediate offsets
//------------------------------------------------------------------------------
STLURB WZR, [X10]
STLURB W1, [X10]
STLURB W1, [X10, stlurb w2, [x11, STLURB W3, [SP,
//CHECK: stlurb w1, [x10] // encoding: [0x41,0x01,0x00,0x19]
//CHECK-NEXT: stlurb w1, [x10, //CHECK-NEXT: stlurb w2, [x11, //CHECK-NEXT: stlurb w3, [sp,
ldapurb wzr, [x12]
ldapurb w4, [x12]
ldapurb w4, [x12, LDAPURB W5, [X13, LDAPURB W6, [SP,
//CHECK: ldapurb wzr, [x12] // encoding: [0x9f,0x01,0x40,0x19]
//CHECK-NEXT: ldapurb w4, [x12] // encoding: [0x84,0x01,0x40,0x19]
//CHECK-NEXT: ldapurb w4, [x12, //CHECK-NEXT: ldapurb w5, [x13, //CHECK-NEXT: ldapurb w6, [sp,
LDAPURSB W7, [X14]
LDAPURSB W7, [X14, ldapursb w8, [x15, ldapursb w9, [sp,
//CHECK: ldapursb w7, [x14] // encoding: [0xc7,0x01,0xc0,0x19]
//CHECK-NEXT: ldapursb w7, [x14, //CHECK-NEXT: ldapursb w8, [x15, //CHECK-NEXT: ldapursb w9, [sp,
LDAPURSB X0, [X16]
LDAPURSB X0, [X16, LDAPURSB X1, [X17, ldapursb x2, [sp, ldapursb x2, [sp]
//CHECK: ldapursb x0, [x16] // encoding: [0x00,0x02,0x80,0x19]
//CHECK-NEXT: ldapursb x0, [x16, //CHECK-NEXT: ldapursb x1, [x17, //CHECK-NEXT: ldapursb x2, [sp] // encoding: [0xe2,0x03,0x80,0x19]
//CHECK-NEXT: ldapursb x2, [sp] // encoding: [0xe2,0x03,0x80,0x19]
stlurh w10, [x18]
stlurh w10, [x18, STLURH W11, [X19, STLURH W12, [SP,
//CHECK: stlurh w10, [x18] // encoding: [0x4a,0x02,0x00,0x59]
//CHECK-NEXT: stlurh w10, [x18, //CHECK-NEXT: stlurh w11, [x19, //CHECK-NEXT: stlurh w12, [sp,
LDAPURH W13, [X20]
LDAPURH W13, [X20, ldapurh w14, [x21, LDAPURH W15, [SP,
//CHECK: ldapurh w13, [x20] // encoding: [0x8d,0x02,0x40,0x59]
//CHECK-NEXT: ldapurh w13, [x20, //CHECK-NEXT: ldapurh w14, [x21, //CHECK-NEXT: ldapurh w15, [sp,
LDAPURSH W16, [X22]
LDAPURSH W16, [X22, LDAPURSH W17, [X23, ldapursh w18, [sp,
//CHECK: ldapursh w16, [x22] // encoding: [0xd0,0x02,0xc0,0x59]
//CHECK-NEXT: ldapursh w16, [x22, //CHECK-NEXT: ldapursh w17, [x23, //CHECK-NEXT: ldapursh w18, [sp,
ldapursh x3, [x24]
ldapursh x3, [x24, LDAPURSH X4, [X25, LDAPURSH X5, [SP,
//CHECK: ldapursh x3, [x24] // encoding: [0x03,0x03,0x80,0x59]
//CHECK-NEXT: ldapursh x3, [x24, //CHECK-NEXT: ldapursh x4, [x25, //CHECK-NEXT: ldapursh x5, [sp,
STLUR W19, [X26]
STLUR W19, [X26, stlur w20, [x27, STLUR W21, [SP,
//CHECK: stlur w19, [x26] // encoding: [0x53,0x03,0x00,0x99]
//CHECK-NEXT: stlur w19, [x26, //CHECK-NEXT: stlur w20, [x27, //CHECK-NEXT: stlur w21, [sp,
LDAPUR W22, [X28]
LDAPUR W22, [X28, LDAPUR W23, [X29, ldapur w24, [sp,
//CHECK: ldapur w22, [x28] // encoding: [0x96,0x03,0x40,0x99]
//CHECK-NEXT: ldapur w22, [x28, //CHECK-NEXT: ldapur w23, [x29, //CHECK-NEXT: ldapur w24, [sp,
ldapursw x6, [x30]
ldapursw x6, [x30, LDAPURSW X7, [X0, LDAPURSW X8, [SP,
//CHECK: ldapursw x6, [x30] // encoding: [0xc6,0x03,0x80,0x99]
//CHECK-NEXT: ldapursw x6, [x30, //CHECK-NEXT: ldapursw x7, [x0, //CHECK-NEXT: ldapursw x8, [sp,
STLUR X9, [X1]
STLUR X9, [X1, stlur x10, [x2, STLUR X11, [SP,
//CHECK: stlur x9, [x1] // encoding: [0x29,0x00,0x00,0xd9]
//CHECK-NEXT: stlur x9, [x1, //CHECK-NEXT: stlur x10, [x2, //CHECK-NEXT: stlur x11, [sp,
LDAPUR X12, [X3]
LDAPUR X12, [X3, LDAPUR X13, [X4, ldapur x14, [sp,
//CHECK: ldapur x12, [x3] // encoding: [0x6c,0x00,0x40,0xd9]
//CHECK-NEXT: ldapur x12, [x3, //CHECK-NEXT: ldapur x13, [x4, //CHECK-NEXT: ldapur x14, [sp,
//CHECK-NO-V84: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLURB WZR, [X10]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLURB W1, [X10]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLURB W1, [X10, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: stlurb w2, [x11, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLURB W3, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapurb wzr, [x12]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapurb w4, [x12]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapurb w4, [x12, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURB W5, [X13, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURB W6, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSB W7, [X14]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSB W7, [X14, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursb w8, [x15, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursb w9, [sp, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSB X0, [X16]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSB X0, [X16, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSB X1, [X17, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursb x2, [sp, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursb x2, [sp]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: stlurh w10, [x18]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: stlurh w10, [x18, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLURH W11, [X19, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLURH W12, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURH W13, [X20]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURH W13, [X20, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapurh w14, [x21, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURH W15, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSH W16, [X22]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSH W16, [X22, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSH W17, [X23, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursh w18, [sp, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursh x3, [x24]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursh x3, [x24, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSH X4, [X25, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSH X5, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLUR W19, [X26]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLUR W19, [X26, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: stlur w20, [x27, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLUR W21, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPUR W22, [X28]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPUR W22, [X28, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPUR W23, [X29, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapur w24, [sp, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursw x6, [x30]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapursw x6, [x30, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSW X7, [X0, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPURSW X8, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLUR X9, [X1]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLUR X9, [X1, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: stlur x10, [x2, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: STLUR X11, [SP, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPUR X12, [X3]
//CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPUR X12, [X3, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: LDAPUR X13, [X4, //CHECK-NO-V84-NEXT: ^
//CHECK-NO-V84-NEXT: error: instruction requires: rcpc-immo
//CHECK-NO-V84-NEXT: ldapur x14, [sp, //CHECK-NO-V84-NEXT: ^