File: seh-unwindv2.s

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (154 lines) | stat: -rw-r--r-- 4,246 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -u - | FileCheck %s

// CHECK:       UnwindInformation [

.text

single_epilog_atend:
    .seh_proc stack_alloc_no_pushes
    .seh_unwindversion 2
    subq    $40, %rsp
    .seh_stackalloc 40
    .seh_endprologue
    callq   a
    nop
    .seh_startepilogue
    addq    $40, %rsp
    .seh_unwindv2start
    .seh_endepilogue
    retq
    .seh_endproc
// CHECK-LABEL:  StartAddress: single_epilog_atend
// CHECK-NEXT:   EndAddress: single_epilog_atend +0xF
// CHECK-NEXT:   UnwindInfoAddress: .xdata
// CHECK-NEXT:   UnwindInfo {
// CHECK-NEXT:     Version: 2
// CHECK-NEXT:     Flags [ (0x0)
// CHECK-NEXT:     ]
// CHECK-NEXT:     PrologSize: 4
// CHECK-NEXT:     FrameRegister: -
// CHECK-NEXT:     FrameOffset: -
// CHECK-NEXT:     UnwindCodeCount: 3
// CHECK-NEXT:     UnwindCodes [
// CHECK-NEXT:       0x01: EPILOG atend=yes, length=0x1
// CHECK-NEXT:       0x00: EPILOG padding
// CHECK-NEXT:       0x04: ALLOC_SMALL size=40
// CHECK-NEXT:     ]
// CHECK-NEXT:   }

single_epilog_notatend:
    .seh_proc stack_alloc_no_pushes
    .seh_unwindversion 2
    subq    $40, %rsp
    .seh_stackalloc 40
    .seh_endprologue
    callq   a
    nop
    .seh_startepilogue
    addq    $40, %rsp
    .seh_unwindv2start
    .seh_endepilogue
    retq
    nop
    .seh_endproc
// CHECK-LABEL:  StartAddress: single_epilog_notatend
// CHECK-NEXT:   EndAddress: single_epilog_notatend +0x10
// CHECK-NEXT:   UnwindInfoAddress: .xdata +0xC
// CHECK-NEXT:   UnwindInfo {
// CHECK-NEXT:     Version: 2
// CHECK-NEXT:     Flags [ (0x0)
// CHECK-NEXT:     ]
// CHECK-NEXT:     PrologSize: 4
// CHECK-NEXT:     FrameRegister: -
// CHECK-NEXT:     FrameOffset: -
// CHECK-NEXT:     UnwindCodeCount: 3
// CHECK-NEXT:     UnwindCodes [
// CHECK-NEXT:       0x01: EPILOG atend=no, length=0x1
// CHECK-NEXT:       0x02: EPILOG offset=0x2
// CHECK-NEXT:       0x04: ALLOC_SMALL size=40
// CHECK-NEXT:     ]
// CHECK-NEXT:   }

multiple_epilogs:
    .seh_proc multiple_epilogs
    .seh_unwindversion 2
    subq    $40, %rsp
    .seh_stackalloc 40
    .seh_endprologue
    callq   c
    testl   %eax, %eax
    jle     .L_ELSE_1
    movl    %eax, %ecx
    .seh_startepilogue
    addq    $40, %rsp
    .seh_unwindv2start
    .seh_endepilogue
    jmp     c
.L_ELSE_1:
    nop
    .seh_startepilogue
    addq    $40, %rsp
    .seh_unwindv2start
    .seh_endepilogue
    jmp     b
    .seh_endproc
// CHECK-LABEL:  StartAddress: multiple_epilogs
// CHECK-NEXT:   EndAddress: multiple_epilogs +0x22
// CHECK-NEXT:   UnwindInfoAddress: .xdata +0x18
// CHECK-NEXT:   UnwindInfo {
// CHECK-NEXT:     Version: 2
// CHECK-NEXT:     Flags [ (0x0)
// CHECK-NEXT:     ]
// CHECK-NEXT:     PrologSize: 4
// CHECK-NEXT:     FrameRegister: -
// CHECK-NEXT:     FrameOffset: -
// CHECK-NEXT:     UnwindCodeCount: 5
// CHECK-NEXT:     UnwindCodes [
// CHECK-NEXT:       0x01: EPILOG atend=no, length=0x1
// CHECK-NEXT:       0x05: EPILOG offset=0x5
// CHECK-NEXT:       0x0F: EPILOG offset=0xF
// CHECK-NEXT:       0x00: EPILOG padding
// CHECK-NEXT:       0x04: ALLOC_SMALL size=40
// CHECK-NEXT:     ]
// CHECK-NEXT:   }

mismatched_terminators:
    .seh_proc mismatched_terminators
    .seh_unwindversion 2
    subq    $40, %rsp
    .seh_stackalloc 40
    .seh_endprologue
    callq   b
    testl   %eax, %eax
    jle     .L_ELSE_1
# %bb.2:
    .seh_startepilogue
    addq    $40, %rsp
    .seh_unwindv2start
    .seh_endepilogue
    jmp     b
.L_ELSE_2:
    nop
    .seh_startepilogue
    addq    $40, %rsp
    .seh_unwindv2start
    .seh_endepilogue
    retq
    .seh_endproc
// CHECK-LABEL:  StartAddress: mismatched_terminators
// CHECK-NEXT:   EndAddress: mismatched_terminators +0x1C
// CHECK-NEXT:   UnwindInfoAddress: .xdata +0x28
// CHECK-NEXT:   UnwindInfo {
// CHECK-NEXT:     Version: 2
// CHECK-NEXT:     Flags [ (0x0)
// CHECK-NEXT:     ]
// CHECK-NEXT:     PrologSize: 4
// CHECK-NEXT:     FrameRegister: -
// CHECK-NEXT:     FrameOffset: -
// CHECK-NEXT:     UnwindCodeCount: 3
// CHECK-NEXT:     UnwindCodes [
// CHECK-NEXT:       0x01: EPILOG atend=yes, length=0x1
// CHECK-NEXT:       0x0B: EPILOG offset=0xB
// CHECK-NEXT:       0x04: ALLOC_SMALL size=40
// CHECK-NEXT:     ]
// CHECK-NEXT:   }