# RUN: llvm-mc -triple thumbv8.1m.main-arm-none-eabi -mattr=+pacbti -disassemble %s 2> /dev/null | FileCheck %s
0x51,0xfb,0x02,0x0f
0x5e,0xfb,0x0d,0xcf
0xaf,0xf3,0x2d,0x80
0x51,0xfb,0x12,0x0f
0xaf,0xf3,0x0f,0x80
0x61,0xfb,0x02,0xf0
0x6e,0xfb,0x0d,0xfc
0xaf,0xf3,0x1d,0x80
0xaf,0xf3,0x0d,0x80
0x80,0xf3,0x20,0x88
0x80,0xf3,0x21,0x88
0x80,0xf3,0x22,0x88
0x80,0xf3,0x23,0x88
0x80,0xf3,0x24,0x88
0x80,0xf3,0x25,0x88
0x80,0xf3,0x26,0x88
0x80,0xf3,0x27,0x88
0x80,0xf3,0xa0,0x88
0x80,0xf3,0xa1,0x88
0x80,0xf3,0xa2,0x88
0x80,0xf3,0xa3,0x88
0x80,0xf3,0xa4,0x88
0x80,0xf3,0xa5,0x88
0x80,0xf3,0xa6,0x88
0x80,0xf3,0xa7,0x88
0xef,0xf3,0x20,0x80
0xef,0xf3,0x21,0x80
0xef,0xf3,0x22,0x80
0xef,0xf3,0x23,0x80
0xef,0xf3,0x24,0x80
0xef,0xf3,0x25,0x80
0xef,0xf3,0x26,0x80
0xef,0xf3,0x27,0x80
0xef,0xf3,0xa0,0x80
0xef,0xf3,0xa1,0x80
0xef,0xf3,0xa2,0x80
0xef,0xf3,0xa3,0x80
0xef,0xf3,0xa4,0x80
0xef,0xf3,0xa5,0x80
0xef,0xf3,0xa6,0x80
0xef,0xf3,0xa7,0x80
# Test softfail encodings
0xa7,0xf3,0x1d,0x80
0xab,0xf3,0x1d,0x80
0xad,0xf3,0x1d,0x80
0xae,0xf3,0x1d,0x80
0xaf,0xf3,0x1d,0x88
0xaf,0xf3,0x1d,0xa0
0xaf,0xf3,0x2d,0x80
0xab,0xf3,0x2d,0x80
0xad,0xf3,0x2d,0x80
0xae,0xf3,0x2d,0x80
0xaf,0xf3,0x2d,0x88
0xaf,0xf3,0x2d,0xa0
0xa7,0xf3,0x0f,0x80
0xab,0xf3,0x0f,0x80
0xad,0xf3,0x0f,0x80
0xae,0xf3,0x0f,0x80
0xaf,0xf3,0x0f,0x88
0xaf,0xf3,0x0f,0xa0
0xa7,0xf3,0x0d,0x80
0xab,0xf3,0x0d,0x80
0xad,0xf3,0x0d,0x80
0xae,0xf3,0x0d,0x80
0xaf,0xf3,0x0d,0x88
0xaf,0xf3,0x0d,0xa0
# CHECK: autg r0, r1, r2
# CHECK: autg r12, lr, sp
# CHECK: aut r12, lr, sp
# CHECK: bxaut r0, r1, r2
# CHECK: bti
# CHECK: pacg r0, r1, r2
# CHECK: pacg r12, lr, sp
# CHECK: pac r12, lr, sp
# CHECK: pacbti r12, lr, sp
# CHECK: msr pac_key_p_0, r0
# CHECK: msr pac_key_p_1, r0
# CHECK: msr pac_key_p_2, r0
# CHECK: msr pac_key_p_3, r0
# CHECK: msr pac_key_u_0, r0
# CHECK: msr pac_key_u_1, r0
# CHECK: msr pac_key_u_2, r0
# CHECK: msr pac_key_u_3, r0
# CHECK: msr pac_key_p_0_ns, r0
# CHECK: msr pac_key_p_1_ns, r0
# CHECK: msr pac_key_p_2_ns, r0
# CHECK: msr pac_key_p_3_ns, r0
# CHECK: msr pac_key_u_0_ns, r0
# CHECK: msr pac_key_u_1_ns, r0
# CHECK: msr pac_key_u_2_ns, r0
# CHECK: msr pac_key_u_3_ns, r0
# CHECK: mrs r0, pac_key_p_0
# CHECK: mrs r0, pac_key_p_1
# CHECK: mrs r0, pac_key_p_2
# CHECK: mrs r0, pac_key_p_3
# CHECK: mrs r0, pac_key_u_0
# CHECK: mrs r0, pac_key_u_1
# CHECK: mrs r0, pac_key_u_2
# CHECK: mrs r0, pac_key_u_3
# CHECK: mrs r0, pac_key_p_0_ns
# CHECK: mrs r0, pac_key_p_1_ns
# CHECK: mrs r0, pac_key_p_2_ns
# CHECK: mrs r0, pac_key_p_3_ns
# CHECK: mrs r0, pac_key_u_0_ns
# CHECK: mrs r0, pac_key_u_1_ns
# CHECK: mrs r0, pac_key_u_2_ns
# CHECK: mrs r0, pac_key_u_3_ns
# Softfail encodings
# CHECK: pac r12, lr, sp
# CHECK: pac r12, lr, sp
# CHECK: pac r12, lr, sp
# CHECK: pac r12, lr, sp
# CHECK: pac r12, lr, sp
# CHECK: pac r12, lr, sp
# CHECK: aut r12, lr, sp
# CHECK: aut r12, lr, sp
# CHECK: aut r12, lr, sp
# CHECK: aut r12, lr, sp
# CHECK: aut r12, lr, sp
# CHECK: aut r12, lr, sp
# CHECK: bti
# CHECK: bti
# CHECK: bti
# CHECK: bti
# CHECK: bti
# CHECK: bti
# CHECK: pacbti r12, lr, sp
# CHECK: pacbti r12, lr, sp
# CHECK: pacbti r12, lr, sp
# CHECK: pacbti r12, lr, sp
# CHECK: pacbti r12, lr, sp
# CHECK: pacbti r12, lr, sp