1 // This test checks that the unwind data is dumped by llvm-objdump.
2 // RUN: llvm-objdump -u %p/Inputs/win64-unwind.exe.coff-x86_64.obj \
3 // RUN: | FileCheck -check-prefix=OBJ %s
4 // RUN: llvm-objdump -u %p/Inputs/win64-unwind.exe.coff-x86_64.exe \
5 // RUN: | FileCheck -check-prefix=EXE %s
9 OBJ-NEXT: Start Address: func
10 OBJ-NEXT: End Address: func + 0x001b
11 OBJ-NEXT: Unwind Info Address: .xdata
13 OBJ-NEXT: Flags: 1 UNW_ExceptionHandler
14 OBJ-NEXT: Size of prolog: 18
15 OBJ-NEXT: Number of Codes: 8
16 OBJ-NEXT: Frame register: RBX
17 OBJ-NEXT: Frame offset: 0
18 OBJ-NEXT: Unwind Codes:
19 OBJ-NEXT: 0x12: UOP_SetFPReg
20 OBJ-NEXT: 0x0f: UOP_PushNonVol RBX
21 OBJ-NEXT: 0x0e: UOP_SaveXMM128 XMM8 [0x0000]
22 OBJ-NEXT: 0x09: UOP_SaveNonVol RSI [0x0010]
23 OBJ-NEXT: 0x04: UOP_AllocSmall 24
24 OBJ-NEXT: 0x00: UOP_PushMachFrame w/o error code
26 OBJ-NEXT: Start Address: func + 0x0012
27 OBJ-NEXT: End Address: func + 0x0012
28 OBJ-NEXT: Unwind Info Address: .xdata + 0x001c
30 OBJ-NEXT: Flags: 4 UNW_ChainInfo
31 OBJ-NEXT: Size of prolog: 0
32 OBJ-NEXT: Number of Codes: 0
33 OBJ-NEXT: No frame pointer used
35 OBJ-NEXT: Start Address: smallFunc
36 OBJ-NEXT: End Address: smallFunc + 0x0001
37 OBJ-NEXT: Unwind Info Address: .xdata + 0x002c
40 OBJ-NEXT: Size of prolog: 0
41 OBJ-NEXT: Number of Codes: 0
42 OBJ-NEXT: No frame pointer used
44 OBJ-NEXT: Start Address: allocFunc
45 OBJ-NEXT: End Address: allocFunc + 0x001d
46 OBJ-NEXT: Unwind Info Address: .xdata + 0x0034
49 OBJ-NEXT: Size of prolog: 14
50 OBJ-NEXT: Number of Codes: 6
51 OBJ-NEXT: No frame pointer used
52 OBJ-NEXT: Unwind Codes:
53 OBJ-NEXT: 0x0e: UOP_AllocLarge 8454128
54 OBJ-NEXT: 0x07: UOP_AllocLarge 8190
55 OBJ-NEXT: 0x00: UOP_PushMachFrame w/o error code
58 EXE-NEXT: Start Address: 0x1000
59 EXE-NEXT: End Address: 0x101b
60 EXE-NEXT: Unwind Info Address: 0x2000
62 EXE-NEXT: Flags: 1 UNW_ExceptionHandler
63 EXE-NEXT: Size of prolog: 18
64 EXE-NEXT: Number of Codes: 8
65 EXE-NEXT: Frame register: RBX
66 EXE-NEXT: Frame offset: 0
67 EXE-NEXT: Unwind Codes:
68 EXE-NEXT: 0x12: UOP_SetFPReg
69 EXE-NEXT: 0x0f: UOP_PushNonVol RBX
70 EXE-NEXT: 0x0e: UOP_SaveXMM128 XMM8 [0x0000]
71 EXE-NEXT: 0x09: UOP_SaveNonVol RSI [0x0010]
72 EXE-NEXT: 0x04: UOP_AllocSmall 24
73 EXE-NEXT: 0x00: UOP_PushMachFrame w/o error code
76 EXE-NEXT: Start Address: 0x1012
77 EXE-NEXT: End Address: 0x1012
78 EXE-NEXT: Unwind Info Address: 0x201c
80 EXE-NEXT: Flags: 4 UNW_ChainInfo
81 EXE-NEXT: Size of prolog: 0
82 EXE-NEXT: Number of Codes: 0
83 EXE-NEXT: No frame pointer used
86 EXE-NEXT: Start Address: 0x101b
87 EXE-NEXT: End Address: 0x101c
88 EXE-NEXT: Unwind Info Address: 0x202c
91 EXE-NEXT: Size of prolog: 0
92 EXE-NEXT: Number of Codes: 0
93 EXE-NEXT: No frame pointer used
96 EXE-NEXT: Start Address: 0x101c
97 EXE-NEXT: End Address: 0x1039
98 EXE-NEXT: Unwind Info Address: 0x2034
101 EXE-NEXT: Size of prolog: 14
102 EXE-NEXT: Number of Codes: 6
103 EXE-NEXT: No frame pointer used
104 EXE-NEXT: Unwind Codes:
105 EXE-NEXT: 0x0e: UOP_AllocLarge 8454128
106 EXE-NEXT: 0x07: UOP_AllocLarge 8190
107 EXE-NEXT: 0x00: UOP_PushMachFrame w/o error code