29 lines · plain
1# REQUIRES: x862 3# This test verifies that disassemble -b prints out the correct bytes and4# format for x86_64 instructions of various sizes, and that an unknown5# instruction shows the opcode and disassembles as "<unknown>"6 7# RUN: llvm-mc -filetype=obj --triple=x86_64-unknown-unknown %s -o %t8# RUN: %lldb -b %t -o "disassemble -b -n main" | FileCheck %s9 10main: # @main11 subq $0x18, %rsp12 movl $0x0, 0x14(%rsp)13 movq %rdx, 0x8(%rsp)14 movl %ecx, 0x4(%rsp)15 movl (%rsp), %eax16 addq $0x18, %rsp17 retq18 .byte 0x6 19 20# CHECK: [0x0] <+0>: 48 83 ec 18 subq $0x18, %rsp21# CHECK-NEXT: [0x4] <+4>: c7 44 24 14 00 00 00 00 movl $0x0, 0x14(%rsp)22# CHECK-NEXT: [0xc] <+12>: 48 89 54 24 08 movq %rdx, 0x8(%rsp)23# CHECK-NEXT: [0x11] <+17>: 89 4c 24 04 movl %ecx, 0x4(%rsp)24# CHECK-NEXT: [0x15] <+21>: 8b 04 24 movl (%rsp), %eax25# CHECK-NEXT: [0x18] <+24>: 48 83 c4 18 addq $0x18, %rsp26# CHECK-NEXT: [0x1c] <+28>: c3 retq27# CHECK-NEXT: [0x1d] <+29>: 06 <unknown>28 29