# RUN: not llvm-mc -disassemble -triple=armv7a-arm-none-eabi -mattr=+vfp2 -show-encoding < %s 2>%t \
# RUN: | FileCheck --check-prefix=CHECK-V7A %s
# RUN:   FileCheck --check-prefix=ERROR-V7A < %t %s
# RUN: llvm-mc -disassemble -triple=armv8a-arm-none-eabi -mattr=+fp-armv8 -show-encoding < %s 2>%t \
# RUN: | FileCheck --check-prefix=CHECK-V8A %s
# RUN:   FileCheck --check-prefix=ERROR-V8A < %t %s

       [0x10,0xfa,0xf1,0xee]
       [0x10,0xfa,0xf1,0xee]
       [0x10,0xfa,0xf1,0xee]
       [0x10,0xaa,0xf1,0xee]
       [0x10,0x2a,0xf0,0xee]
       [0x10,0x3a,0xf0,0xee]
       [0x10,0x4a,0xf7,0xee]
       [0x10,0x5a,0xf6,0xee]
       [0x10,0x6a,0xf5,0xee]
       [0x10,0xda,0xf1,0xee]

# CHECK-V7A: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
# CHECK-V7A: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
# CHECK-V7A: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
# CHECK-V7A: vmrs r10, fpscr             @ encoding: [0x10,0xaa,0xf1,0xee]
# CHECK-V7A: vmrs r2, fpsid              @ encoding: [0x10,0x2a,0xf0,0xee]
# CHECK-V7A: vmrs r3, fpsid              @ encoding: [0x10,0x3a,0xf0,0xee]
# CHECK-V7A: vmrs r4, mvfr0              @ encoding: [0x10,0x4a,0xf7,0xee]
# CHECK-V7A: vmrs r5, mvfr1              @ encoding: [0x10,0x5a,0xf6,0xee]
# ERROR-V7A: invalid instruction encoding
# CHECK-V7A: vmrs sp, fpscr              @ encoding: [0x10,0xda,0xf1,0xee]

# CHECK-V8A: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
# CHECK-V8A: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
# CHECK-V8A: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
# CHECK-V8A: vmrs r10, fpscr             @ encoding: [0x10,0xaa,0xf1,0xee]
# CHECK-V8A: vmrs r2, fpsid              @ encoding: [0x10,0x2a,0xf0,0xee]
# CHECK-V8A: vmrs r3, fpsid              @ encoding: [0x10,0x3a,0xf0,0xee]
# CHECK-V8A: vmrs r4, mvfr0              @ encoding: [0x10,0x4a,0xf7,0xee]
# CHECK-V8A: vmrs r5, mvfr1              @ encoding: [0x10,0x5a,0xf6,0xee]
# CHECK-V8A: vmrs r6, mvfr2              @ encoding: [0x10,0x6a,0xf5,0xee]
# CHECK-V8A: vmrs sp, fpscr              @ encoding: [0x10,0xda,0xf1,0xee]

       [0x10,0xfa,0xe1,0xee]
       [0x10,0x0a,0xe1,0xee]
       [0x10,0x1a,0xe8,0xee]
       [0x10,0x2a,0xe0,0xee]
       [0x10,0xaa,0xe1,0xee]
       [0x10,0xda,0xe1,0xee]

# ERROR-V7A: potentially undefined instruction encoding
# CHECK-V7A: vmsr  fpscr, r0             @ encoding: [0x10,0x0a,0xe1,0xee]
# CHECK-V7A: vmsr  fpexc, r1             @ encoding: [0x10,0x1a,0xe8,0xee]
# CHECK-V7A: vmsr  fpsid, r2             @ encoding: [0x10,0x2a,0xe0,0xee]
# CHECK-V7A: vmsr  fpscr, r10            @ encoding: [0x10,0xaa,0xe1,0xee]
# CHECK-V7A: vmsr  fpscr, sp             @ encoding: [0x10,0xda,0xe1,0xee]

# ERROR-V8A: potentially undefined instruction encoding
# CHECK-V8A: vmsr  fpscr, r0             @ encoding: [0x10,0x0a,0xe1,0xee]
# CHECK-V8A: vmsr  fpexc, r1             @ encoding: [0x10,0x1a,0xe8,0xee]
# CHECK-V8A: vmsr  fpsid, r2             @ encoding: [0x10,0x2a,0xe0,0xee]
# CHECK-V8A: vmsr  fpscr, r10            @ encoding: [0x10,0xaa,0xe1,0xee]
# CHECK-V8A: vmsr  fpscr, sp             @ encoding: [0x10,0xda,0xe1,0xee]
