llvm-for-llvmta/test/MC/Disassembler/AArch64/arm64-branch.txt

76 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2022-04-25 10:02:23 +02:00
# RUN: llvm-mc -triple arm64-apple-darwin --disassemble < %s | FileCheck %s
#-----------------------------------------------------------------------------
# Unconditional branch (register) instructions.
#-----------------------------------------------------------------------------
0xc0 0x03 0x5f 0xd6
# CHECK: ret
0x20 0x00 0x5f 0xd6
# CHECK: ret x1
0xe0 0x03 0xbf 0xd6
# CHECK: drps
0xe0 0x03 0x9f 0xd6
# CHECK: eret
0xa0 0x00 0x1f 0xd6
# CHECK: br x5
0x20 0x01 0x3f 0xd6
# CHECK: blr x9
0x0B 0x00 0x18 0x37
# CHECK: tbnz w11, #3, #0
#-----------------------------------------------------------------------------
# Exception generation instructions.
#-----------------------------------------------------------------------------
0x20 0x00 0x20 0xd4
# CHECK: brk #0x1
0x41 0x00 0xa0 0xd4
# CHECK: dcps1 #0x2
0x62 0x00 0xa0 0xd4
# CHECK: dcps2 #0x3
0x83 0x00 0xa0 0xd4
# CHECK: dcps3 #0x4
0xa0 0x00 0x40 0xd4
# CHECK: hlt #0x5
0xc2 0x00 0x00 0xd4
# CHECK: hvc #0x6
0xe3 0x00 0x00 0xd4
# CHECK: smc #0x7
0x01 0x01 0x00 0xd4
# CHECK: svc #0x8
#-----------------------------------------------------------------------------
# PC-relative branches (both positive and negative displacement)
#-----------------------------------------------------------------------------
0x07 0x00 0x00 0x14
# CHECK: b #28
0x06 0x00 0x00 0x94
# CHECK: bl #24
0xa1 0x00 0x00 0x54
# CHECK: b.ne #20
0x80 0x00 0x08 0x36
# CHECK: tbz w0, #1, #16
0xe1 0xff 0xf7 0x36
# CHECK: tbz w1, #30, #-4
0x60 0x00 0x08 0x37
# CHECK: tbnz w0, #1, #12
0x40 0x00 0x00 0xb4
# CHECK: cbz x0, #8
0x20 0x00 0x00 0xb5
# CHECK: cbnz x0, #4
0x1f 0x20 0x03 0xd5
# CHECK: nop
0xff 0xff 0xff 0x17
# CHECK: b #-4
0xc1 0xff 0xff 0x54
# CHECK: b.ne #-8
0xa0 0xff 0x0f 0x36
# CHECK: tbz w0, #1, #-12
0x80 0xff 0xff 0xb4
# CHECK: cbz x0, #-16
0x1f 0x20 0x03 0xd5
# CHECK: nop