Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-dwarfdump / X86 / eh-frame-return-address-reg.s
blobfa9f95c9a4da0ee397d3742496b85716afc0d423
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 00000000 CIE
14 # CHECK-NEXT: Format: DWARF32
15 # CHECK-NEXT: Version: 1
16 # CHECK-NEXT: Augmentation: "zR"
17 # CHECK-NEXT: Code alignment factor: 1
18 # CHECK-NEXT: Data alignment factor: 1
19 # CHECK-NEXT: Return address column: 240
20 # CHECK-NEXT: Augmentation data: 1A
22 .text
23 .global _start
24 _start:
25 nop
27 .section .eh_frame,"a",@unwind
28 .long 16 # Size
29 .long 0x00 # ID
30 .byte 0x01 # Version
32 .byte 0x7A # Augmentation string: "zR"
33 .byte 0x52
34 .byte 0x00
36 .byte 0x01 # Code alignment factor, ULEB128
37 .byte 0x01 # Data alignment factor, ULEB128
39 .byte 0xF0 # Return address register, ubyte for version 1.
41 .byte 0x01 # LEB128
42 .byte 0x1A # DW_EH_PE_pcrel | DW_EH_PE_sdata2
44 .byte 0x00
45 .byte 0x00
46 .byte 0x00
48 .long 10 # Size
49 .long 24 # ID
50 fde:
51 .long _start - fde
52 .word 0