[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / tools / llvm-dwarfdump / X86 / eh-frame-return-address-reg.s
blob033766534b6cf52d58d771ee455573427956afde
1 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o
2 # RUN: llvm-dwarfdump -v %t.o | FileCheck %s
4 # The format of the .eh_frame section is similar in
5 # format and purpose to the .debug_frame section.
6 # Version 1 is often used for .eh_frame,
7 # and also it was used for DWARF v2. For that case,
8 # return address register should be encoded as ubyte,
9 # while later versions use ULEB128. This test case
10 # checks that we are able to dump it correctly.
12 # CHECK: .eh_frame contents:
13 # CHECK: 00000000 00000010 ffffffff CIE
14 # CHECK-NEXT: Version: 1
15 # CHECK-NEXT: Augmentation: "zR"
16 # CHECK-NEXT: Code alignment factor: 1
17 # CHECK-NEXT: Data alignment factor: 1
18 # CHECK-NEXT: Return address column: 240
19 # CHECK-NEXT: Augmentation data: 1A
21 .text
22 .global _start
23 _start:
24 nop
26 .section .eh_frame, "a"
27 .long 16 # Size
28 .long 0x00 # ID
29 .byte 0x01 # Version
31 .byte 0x7A # Augmentation string: "zR"
32 .byte 0x52
33 .byte 0x00
35 .byte 0x01 # Code alignment factor, ULEB128
36 .byte 0x01 # Data alignment factor, ULEB128
38 .byte 0xF0 # Return address register, ubyte for version 1.
40 .byte 0x01 # LEB128
41 .byte 0x1A # DW_EH_PE_pcrel | DW_EH_PE_sdata2
43 .byte 0x00
44 .byte 0x00
45 .byte 0x00
47 .long 10 # Size
48 .long 24 # ID
49 fde:
50 .long _start - fde
51 .word 0