# RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.4a --disassemble < %s | FileCheck %s
# RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=-v8.4a --disassemble < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-V84

[0x41,0x01,0x00,0x19]
[0x41,0x01,0x10,0x19]
[0x62,0xf1,0x0f,0x19]
[0xe3,0xd3,0x1f,0x19]

[0x84,0x01,0x40,0x19]
[0x84,0x01,0x50,0x19]
[0xa5,0xf1,0x4f,0x19]
[0xe6,0xe3,0x5f,0x19]

[0xc7,0x01,0xc0,0x19]
[0xc7,0x01,0xd0,0x19]
[0xe8,0xf1,0xcf,0x19]
[0xe9,0xf3,0xdf,0x19]

[0x00,0x02,0x80,0x19]
[0x00,0x02,0x90,0x19]
[0x21,0xf2,0x8f,0x19]
[0xe2,0x03,0x80,0x19]

[0x4a,0x02,0x00,0x59]
[0x4a,0x02,0x10,0x59]
[0x6b,0xf2,0x0f,0x59]
[0xec,0x13,0x00,0x59]

[0x8d,0x02,0x40,0x59]
[0x8d,0x02,0x50,0x59]
[0xae,0xf2,0x4f,0x59]
[0xef,0x23,0x40,0x59]

[0xd0,0x02,0xc0,0x59]
[0xd0,0x02,0xd0,0x59]
[0xf1,0xf2,0xcf,0x59]
[0xf2,0x33,0xc0,0x59]

[0x03,0x03,0x80,0x59]
[0x03,0x03,0x90,0x59]
[0x24,0xf3,0x8f,0x59]
[0xe5,0x43,0x80,0x59]

[0x53,0x03,0x00,0x99]
[0x53,0x03,0x10,0x99]
[0x74,0xf3,0x0f,0x99]
[0xf5,0x53,0x00,0x99]

[0x96,0x03,0x40,0x99]
[0x96,0x03,0x50,0x99]
[0xb7,0xf3,0x4f,0x99]
[0xf8,0x63,0x40,0x99]

[0xc6,0x03,0x80,0x99]
[0xc6,0x03,0x90,0x99]
[0x07,0xf0,0x8f,0x99]
[0xe8,0x73,0x80,0x99]

[0x29,0x00,0x00,0xd9]
[0x29,0x00,0x10,0xd9]
[0x4a,0xf0,0x0f,0xd9]
[0xeb,0x83,0x00,0xd9]

[0x6c,0x00,0x40,0xd9]
[0x6c,0x00,0x50,0xd9]
[0x8d,0xf0,0x4f,0xd9]
[0xee,0x93,0x40,0xd9]

#CHECK:       stlurb    w1, [x10]
#CHECK-NEXT:  stlurb  w1, [x10, #-256]
#CHECK-NEXT:  stlurb  w2, [x11, #255]
#CHECK-NEXT:  stlurb  w3, [sp, #-3]
#CHECK-NEXT:  ldapurb   w4, [x12]
#CHECK-NEXT:  ldapurb w4, [x12, #-256]
#CHECK-NEXT:  ldapurb w5, [x13, #255]
#CHECK-NEXT:  ldapurb w6, [sp, #-2]
#CHECK-NEXT:  ldapursb    w7, [x14]
#CHECK-NEXT:  ldapursb  w7, [x14, #-256]
#CHECK-NEXT:  ldapursb  w8, [x15, #255]
#CHECK-NEXT:  ldapursb  w9, [sp, #-1]
#CHECK-NEXT:  ldapursb    x0, [x16]
#CHECK-NEXT:  ldapursb  x0, [x16, #-256]
#CHECK-NEXT:  ldapursb  x1, [x17, #255]
#CHECK-NEXT:  ldapursb    x2, [sp]
#CHECK-NEXT:  stlurh    w10, [x18]
#CHECK-NEXT:  stlurh  w10, [x18, #-256]
#CHECK-NEXT:  stlurh  w11, [x19, #255]
#CHECK-NEXT:  stlurh  w12, [sp, #1]
#CHECK-NEXT:  ldapurh   w13, [x20]
#CHECK-NEXT:  ldapurh w13, [x20, #-256]
#CHECK-NEXT:  ldapurh w14, [x21, #255]
#CHECK-NEXT:  ldapurh w15, [sp, #2]
#CHECK-NEXT:  ldapursh    w16, [x22]
#CHECK-NEXT:  ldapursh  w16, [x22, #-256]
#CHECK-NEXT:  ldapursh  w17, [x23, #255]
#CHECK-NEXT:  ldapursh  w18, [sp, #3]
#CHECK-NEXT:  ldapursh    x3, [x24]
#CHECK-NEXT:  ldapursh  x3, [x24, #-256]
#CHECK-NEXT:  ldapursh  x4, [x25, #255]
#CHECK-NEXT:  ldapursh  x5, [sp, #4]
#CHECK-NEXT:  stlur   w19, [x26]
#CHECK-NEXT:  stlur w19, [x26, #-256]
#CHECK-NEXT:  stlur w20, [x27, #255]
#CHECK-NEXT:  stlur w21, [sp, #5]
#CHECK-NEXT:  ldapur    w22, [x28]
#CHECK-NEXT:  ldapur  w22, [x28, #-256]
#CHECK-NEXT:  ldapur  w23, [x29, #255]
#CHECK-NEXT:  ldapur  w24, [sp, #6]
#CHECK-NEXT:  ldapursw    x6, [x30]
#CHECK-NEXT:  ldapursw  x6, [x30, #-256]
#CHECK-NEXT:  ldapursw  x7, [x0, #255]
#CHECK-NEXT:  ldapursw  x8, [sp, #7]
#CHECK-NEXT:  stlur   x9, [x1]
#CHECK-NEXT:  stlur x9, [x1, #-256]
#CHECK-NEXT:  stlur x10, [x2, #255]
#CHECK-NEXT:  stlur x11, [sp, #8]
#CHECK-NEXT:  ldapur    x12, [x3]
#CHECK-NEXT:  ldapur  x12, [x3, #-256]
#CHECK-NEXT:  ldapur  x13, [x4, #255]
#CHECK-NEXT:  ldapur  x14, [sp, #9]

#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x41,0x01,0x00,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x41,0x01,0x10,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x62,0xf1,0x0f,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xe3,0xd3,0x1f,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x84,0x01,0x40,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x84,0x01,0x50,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xa5,0xf1,0x4f,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xe6,0xe3,0x5f,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xc7,0x01,0xc0,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xc7,0x01,0xd0,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xe8,0xf1,0xcf,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xe9,0xf3,0xdf,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x00,0x02,0x80,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x00,0x02,0x90,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x21,0xf2,0x8f,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xe2,0x03,0x80,0x19]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x4a,0x02,0x00,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x4a,0x02,0x10,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x6b,0xf2,0x0f,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xec,0x13,0x00,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x8d,0x02,0x40,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x8d,0x02,0x50,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xae,0xf2,0x4f,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xef,0x23,0x40,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xd0,0x02,0xc0,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xd0,0x02,0xd0,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xf1,0xf2,0xcf,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xf2,0x33,0xc0,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x03,0x03,0x80,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x03,0x03,0x90,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x24,0xf3,0x8f,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xe5,0x43,0x80,0x59]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x53,0x03,0x00,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x53,0x03,0x10,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x74,0xf3,0x0f,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xf5,0x53,0x00,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x96,0x03,0x40,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x96,0x03,0x50,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xb7,0xf3,0x4f,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xf8,0x63,0x40,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xc6,0x03,0x80,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xc6,0x03,0x90,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x07,0xf0,0x8f,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xe8,0x73,0x80,0x99]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x29,0x00,0x00,0xd9]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x29,0x00,0x10,0xd9]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x4a,0xf0,0x0f,0xd9]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xeb,0x83,0x00,0xd9]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x6c,0x00,0x40,0xd9]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x6c,0x00,0x50,0xd9]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0x8d,0xf0,0x4f,0xd9]
#CHECK-NO-V84:  ^
#CHECK-NO-V84: warning: invalid instruction encoding
#CHECK-NO-V84: [0xee,0x93,0x40,0xd9]
#CHECK-NO-V84:  ^
