]> git.pld-linux.org Git - packages/llvm.git/blob - llvm12-build_fixes.patch
up to 12.0.0
[packages/llvm.git] / llvm12-build_fixes.patch
1 From f51ab1871655a9a96134c2636c37dcb5a6b01ac3 Mon Sep 17 00:00:00 2001
2 From: serge-sans-paille <sguelton@redhat.com>
3 Date: Mon, 22 Mar 2021 10:05:25 +0100
4 Subject: [PATCH] Make clangd CompletionModel usable even with non-standard
5  (but supported) layout
6
7 llvm supports specifying a non-standard layout where each project lies in its
8 own place. Do not assume a fixed layout and use the appropriate cmake variable
9 instead.
10
11 Differential Revision: https://reviews.llvm.org/D96787
12 ---
13  clang-tools-extra/clangd/quality/CompletionModel.cmake | 4 ++--
14  1 file changed, 2 insertions(+), 2 deletions(-)
15
16 diff --git a/clang-tools-extra/clangd/quality/CompletionModel.cmake b/clang-tools-extra/clangd/quality/CompletionModel.cmake
17 index 60c6d2aa84330..41bc2ed1890b0 100644
18 --- a/tools/clang/tools/extra/clangd/quality/CompletionModel.cmake
19 +++ b/tools/clang/tools/extra/clangd/quality/CompletionModel.cmake
20 @@ -5,8 +5,8 @@
21  # will define a C++ class called ${cpp_class} - which may be a
22  # namespace-qualified class name.
23  function(gen_decision_forest model filename cpp_class)
24 -  set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
25 -  
26 +  set(model_compiler ${LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR}/clangd/quality/CompletionModelCodegen.py)
27 +
28    set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
29    set(header_file ${output_dir}/${filename}.h)
30    set(cpp_file ${output_dir}/${filename}.cpp)
31 diff -urN llvm-12.0.0.src.orig/tools/lld/MachO/mach-o/compact_unwind_encoding.h llvm-12.0.0.src/tools/lld/MachO/mach-o/compact_unwind_encoding.h
32 --- llvm-12.0.0.src.orig/tools/lld/MachO/mach-o/compact_unwind_encoding.h       1970-01-01 01:00:00.000000000 +0100
33 +++ llvm-12.0.0.src/tools/lld/MachO/mach-o/compact_unwind_encoding.h    2021-04-16 16:24:55.701577683 +0200
34 @@ -0,0 +1,477 @@
35 +//===------------------ mach-o/compact_unwind_encoding.h ------------------===//
36 +//
37 +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
38 +// See https://llvm.org/LICENSE.txt for license information.
39 +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
40 +//
41 +//
42 +// Darwin's alternative to DWARF based unwind encodings.
43 +//
44 +//===----------------------------------------------------------------------===//
45 +
46 +
47 +#ifndef __COMPACT_UNWIND_ENCODING__
48 +#define __COMPACT_UNWIND_ENCODING__
49 +
50 +#include <stdint.h>
51 +
52 +//
53 +// Compilers can emit standard DWARF FDEs in the __TEXT,__eh_frame section
54 +// of object files. Or compilers can emit compact unwind information in
55 +// the __LD,__compact_unwind section.
56 +//
57 +// When the linker creates a final linked image, it will create a
58 +// __TEXT,__unwind_info section.  This section is a small and fast way for the
59 +// runtime to access unwind info for any given function.  If the compiler
60 +// emitted compact unwind info for the function, that compact unwind info will
61 +// be encoded in the __TEXT,__unwind_info section. If the compiler emitted
62 +// DWARF unwind info, the __TEXT,__unwind_info section will contain the offset
63 +// of the FDE in the __TEXT,__eh_frame section in the final linked image.
64 +//
65 +// Note: Previously, the linker would transform some DWARF unwind infos into
66 +//       compact unwind info.  But that is fragile and no longer done.
67 +
68 +
69 +//
70 +// The compact unwind endoding is a 32-bit value which encoded in an
71 +// architecture specific way, which registers to restore from where, and how
72 +// to unwind out of the function.
73 +//
74 +typedef uint32_t compact_unwind_encoding_t;
75 +
76 +
77 +// architecture independent bits
78 +enum {
79 +    UNWIND_IS_NOT_FUNCTION_START           = 0x80000000,
80 +    UNWIND_HAS_LSDA                        = 0x40000000,
81 +    UNWIND_PERSONALITY_MASK                = 0x30000000,
82 +};
83 +
84 +
85 +
86 +
87 +//
88 +// x86
89 +//
90 +// 1-bit: start
91 +// 1-bit: has lsda
92 +// 2-bit: personality index
93 +//
94 +// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=DWARF
95 +//  ebp based:
96 +//        15-bits (5*3-bits per reg) register permutation
97 +//        8-bits for stack offset
98 +//  frameless:
99 +//        8-bits stack size
100 +//        3-bits stack adjust
101 +//        3-bits register count
102 +//        10-bits register permutation
103 +//
104 +enum {
105 +    UNWIND_X86_MODE_MASK                         = 0x0F000000,
106 +    UNWIND_X86_MODE_EBP_FRAME                    = 0x01000000,
107 +    UNWIND_X86_MODE_STACK_IMMD                   = 0x02000000,
108 +    UNWIND_X86_MODE_STACK_IND                    = 0x03000000,
109 +    UNWIND_X86_MODE_DWARF                        = 0x04000000,
110 +
111 +    UNWIND_X86_EBP_FRAME_REGISTERS               = 0x00007FFF,
112 +    UNWIND_X86_EBP_FRAME_OFFSET                  = 0x00FF0000,
113 +
114 +    UNWIND_X86_FRAMELESS_STACK_SIZE              = 0x00FF0000,
115 +    UNWIND_X86_FRAMELESS_STACK_ADJUST            = 0x0000E000,
116 +    UNWIND_X86_FRAMELESS_STACK_REG_COUNT         = 0x00001C00,
117 +    UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION   = 0x000003FF,
118 +
119 +    UNWIND_X86_DWARF_SECTION_OFFSET              = 0x00FFFFFF,
120 +};
121 +
122 +enum {
123 +    UNWIND_X86_REG_NONE     = 0,
124 +    UNWIND_X86_REG_EBX      = 1,
125 +    UNWIND_X86_REG_ECX      = 2,
126 +    UNWIND_X86_REG_EDX      = 3,
127 +    UNWIND_X86_REG_EDI      = 4,
128 +    UNWIND_X86_REG_ESI      = 5,
129 +    UNWIND_X86_REG_EBP      = 6,
130 +};
131 +
132 +//
133 +// For x86 there are four modes for the compact unwind encoding:
134 +// UNWIND_X86_MODE_EBP_FRAME:
135 +//    EBP based frame where EBP is push on stack immediately after return address,
136 +//    then ESP is moved to EBP. Thus, to unwind ESP is restored with the current
137 +//    EPB value, then EBP is restored by popping off the stack, and the return
138 +//    is done by popping the stack once more into the pc.
139 +//    All non-volatile registers that need to be restored must have been saved
140 +//    in a small range in the stack that starts EBP-4 to EBP-1020.  The offset/4
141 +//    is encoded in the UNWIND_X86_EBP_FRAME_OFFSET bits.  The registers saved
142 +//    are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries.
143 +//    Each entry contains which register to restore.
144 +// UNWIND_X86_MODE_STACK_IMMD:
145 +//    A "frameless" (EBP not used as frame pointer) function with a small 
146 +//    constant stack size.  To return, a constant (encoded in the compact
147 +//    unwind encoding) is added to the ESP. Then the return is done by
148 +//    popping the stack into the pc.
149 +//    All non-volatile registers that need to be restored must have been saved
150 +//    on the stack immediately after the return address.  The stack_size/4 is
151 +//    encoded in the UNWIND_X86_FRAMELESS_STACK_SIZE (max stack size is 1024).
152 +//    The number of registers saved is encoded in UNWIND_X86_FRAMELESS_STACK_REG_COUNT.
153 +//    UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION constains which registers were
154 +//    saved and their order.
155 +// UNWIND_X86_MODE_STACK_IND:
156 +//    A "frameless" (EBP not used as frame pointer) function large constant 
157 +//    stack size.  This case is like the previous, except the stack size is too
158 +//    large to encode in the compact unwind encoding.  Instead it requires that 
159 +//    the function contains "subl $nnnnnnnn,ESP" in its prolog.  The compact 
160 +//    encoding contains the offset to the nnnnnnnn value in the function in
161 +//    UNWIND_X86_FRAMELESS_STACK_SIZE.  
162 +// UNWIND_X86_MODE_DWARF:
163 +//    No compact unwind encoding is available.  Instead the low 24-bits of the
164 +//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.
165 +//    This mode is never used in object files.  It is only generated by the 
166 +//    linker in final linked images which have only DWARF unwind info for a
167 +//    function.
168 +//
169 +// The permutation encoding is a Lehmer code sequence encoded into a
170 +// single variable-base number so we can encode the ordering of up to
171 +// six registers in a 10-bit space.
172 +//
173 +// The following is the algorithm used to create the permutation encoding used
174 +// with frameless stacks.  It is passed the number of registers to be saved and
175 +// an array of the register numbers saved.
176 +//
177 +//uint32_t permute_encode(uint32_t registerCount, const uint32_t registers[6])
178 +//{
179 +//    uint32_t renumregs[6];
180 +//    for (int i=6-registerCount; i < 6; ++i) {
181 +//        int countless = 0;
182 +//        for (int j=6-registerCount; j < i; ++j) {
183 +//            if ( registers[j] < registers[i] )
184 +//                ++countless;
185 +//        }
186 +//        renumregs[i] = registers[i] - countless -1;
187 +//    }
188 +//    uint32_t permutationEncoding = 0;
189 +//    switch ( registerCount ) {
190 +//        case 6:
191 +//            permutationEncoding |= (120*renumregs[0] + 24*renumregs[1]
192 +//                                    + 6*renumregs[2] + 2*renumregs[3]
193 +//                                      + renumregs[4]);
194 +//            break;
195 +//        case 5:
196 +//            permutationEncoding |= (120*renumregs[1] + 24*renumregs[2]
197 +//                                    + 6*renumregs[3] + 2*renumregs[4]
198 +//                                      + renumregs[5]);
199 +//            break;
200 +//        case 4:
201 +//            permutationEncoding |= (60*renumregs[2] + 12*renumregs[3]
202 +//                                   + 3*renumregs[4] + renumregs[5]);
203 +//            break;
204 +//        case 3:
205 +//            permutationEncoding |= (20*renumregs[3] + 4*renumregs[4]
206 +//                                     + renumregs[5]);
207 +//            break;
208 +//        case 2:
209 +//            permutationEncoding |= (5*renumregs[4] + renumregs[5]);
210 +//            break;
211 +//        case 1:
212 +//            permutationEncoding |= (renumregs[5]);
213 +//            break;
214 +//    }
215 +//    return permutationEncoding;
216 +//}
217 +//
218 +
219 +
220 +
221 +
222 +//
223 +// x86_64
224 +//
225 +// 1-bit: start
226 +// 1-bit: has lsda
227 +// 2-bit: personality index
228 +//
229 +// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=DWARF
230 +//  rbp based:
231 +//        15-bits (5*3-bits per reg) register permutation
232 +//        8-bits for stack offset
233 +//  frameless:
234 +//        8-bits stack size
235 +//        3-bits stack adjust
236 +//        3-bits register count
237 +//        10-bits register permutation
238 +//
239 +enum {
240 +    UNWIND_X86_64_MODE_MASK                         = 0x0F000000,
241 +    UNWIND_X86_64_MODE_RBP_FRAME                    = 0x01000000,
242 +    UNWIND_X86_64_MODE_STACK_IMMD                   = 0x02000000,
243 +    UNWIND_X86_64_MODE_STACK_IND                    = 0x03000000,
244 +    UNWIND_X86_64_MODE_DWARF                        = 0x04000000,
245 +
246 +    UNWIND_X86_64_RBP_FRAME_REGISTERS               = 0x00007FFF,
247 +    UNWIND_X86_64_RBP_FRAME_OFFSET                  = 0x00FF0000,
248 +
249 +    UNWIND_X86_64_FRAMELESS_STACK_SIZE              = 0x00FF0000,
250 +    UNWIND_X86_64_FRAMELESS_STACK_ADJUST            = 0x0000E000,
251 +    UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT         = 0x00001C00,
252 +    UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION   = 0x000003FF,
253 +
254 +    UNWIND_X86_64_DWARF_SECTION_OFFSET              = 0x00FFFFFF,
255 +};
256 +
257 +enum {
258 +    UNWIND_X86_64_REG_NONE       = 0,
259 +    UNWIND_X86_64_REG_RBX        = 1,
260 +    UNWIND_X86_64_REG_R12        = 2,
261 +    UNWIND_X86_64_REG_R13        = 3,
262 +    UNWIND_X86_64_REG_R14        = 4,
263 +    UNWIND_X86_64_REG_R15        = 5,
264 +    UNWIND_X86_64_REG_RBP        = 6,
265 +};
266 +//
267 +// For x86_64 there are four modes for the compact unwind encoding:
268 +// UNWIND_X86_64_MODE_RBP_FRAME:
269 +//    RBP based frame where RBP is push on stack immediately after return address,
270 +//    then RSP is moved to RBP. Thus, to unwind RSP is restored with the current 
271 +//    EPB value, then RBP is restored by popping off the stack, and the return 
272 +//    is done by popping the stack once more into the pc.
273 +//    All non-volatile registers that need to be restored must have been saved
274 +//    in a small range in the stack that starts RBP-8 to RBP-2040.  The offset/8 
275 +//    is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits.  The registers saved
276 +//    are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries.
277 +//    Each entry contains which register to restore.  
278 +// UNWIND_X86_64_MODE_STACK_IMMD:
279 +//    A "frameless" (RBP not used as frame pointer) function with a small 
280 +//    constant stack size.  To return, a constant (encoded in the compact 
281 +//    unwind encoding) is added to the RSP. Then the return is done by 
282 +//    popping the stack into the pc.
283 +//    All non-volatile registers that need to be restored must have been saved
284 +//    on the stack immediately after the return address.  The stack_size/8 is
285 +//    encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048).
286 +//    The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT.
287 +//    UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were
288 +//    saved and their order.  
289 +// UNWIND_X86_64_MODE_STACK_IND:
290 +//    A "frameless" (RBP not used as frame pointer) function large constant 
291 +//    stack size.  This case is like the previous, except the stack size is too
292 +//    large to encode in the compact unwind encoding.  Instead it requires that 
293 +//    the function contains "subq $nnnnnnnn,RSP" in its prolog.  The compact 
294 +//    encoding contains the offset to the nnnnnnnn value in the function in
295 +//    UNWIND_X86_64_FRAMELESS_STACK_SIZE.  
296 +// UNWIND_X86_64_MODE_DWARF:
297 +//    No compact unwind encoding is available.  Instead the low 24-bits of the
298 +//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.
299 +//    This mode is never used in object files.  It is only generated by the 
300 +//    linker in final linked images which have only DWARF unwind info for a
301 +//    function.
302 +//
303 +
304 +
305 +// ARM64
306 +//
307 +// 1-bit: start
308 +// 1-bit: has lsda
309 +// 2-bit: personality index
310 +//
311 +// 4-bits: 4=frame-based, 3=DWARF, 2=frameless
312 +//  frameless:
313 +//        12-bits of stack size
314 +//  frame-based:
315 +//        4-bits D reg pairs saved
316 +//        5-bits X reg pairs saved
317 +//  DWARF:
318 +//        24-bits offset of DWARF FDE in __eh_frame section
319 +//
320 +enum {
321 +    UNWIND_ARM64_MODE_MASK                     = 0x0F000000,
322 +    UNWIND_ARM64_MODE_FRAMELESS                = 0x02000000,
323 +    UNWIND_ARM64_MODE_DWARF                    = 0x03000000,
324 +    UNWIND_ARM64_MODE_FRAME                    = 0x04000000,
325 +
326 +    UNWIND_ARM64_FRAME_X19_X20_PAIR            = 0x00000001,
327 +    UNWIND_ARM64_FRAME_X21_X22_PAIR            = 0x00000002,
328 +    UNWIND_ARM64_FRAME_X23_X24_PAIR            = 0x00000004,
329 +    UNWIND_ARM64_FRAME_X25_X26_PAIR            = 0x00000008,
330 +    UNWIND_ARM64_FRAME_X27_X28_PAIR            = 0x00000010,
331 +    UNWIND_ARM64_FRAME_D8_D9_PAIR              = 0x00000100,
332 +    UNWIND_ARM64_FRAME_D10_D11_PAIR            = 0x00000200,
333 +    UNWIND_ARM64_FRAME_D12_D13_PAIR            = 0x00000400,
334 +    UNWIND_ARM64_FRAME_D14_D15_PAIR            = 0x00000800,
335 +
336 +    UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK     = 0x00FFF000,
337 +    UNWIND_ARM64_DWARF_SECTION_OFFSET          = 0x00FFFFFF,
338 +};
339 +// For arm64 there are three modes for the compact unwind encoding:
340 +// UNWIND_ARM64_MODE_FRAME:
341 +//    This is a standard arm64 prolog where FP/LR are immediately pushed on the
342 +//    stack, then SP is copied to FP. If there are any non-volatile registers
343 +//    saved, then are copied into the stack frame in pairs in a contiguous
344 +//    range right below the saved FP/LR pair.  Any subset of the five X pairs 
345 +//    and four D pairs can be saved, but the memory layout must be in register
346 +//    number order.  
347 +// UNWIND_ARM64_MODE_FRAMELESS:
348 +//    A "frameless" leaf function, where FP/LR are not saved. The return address 
349 +//    remains in LR throughout the function. If any non-volatile registers
350 +//    are saved, they must be pushed onto the stack before any stack space is
351 +//    allocated for local variables.  The stack sized (including any saved
352 +//    non-volatile registers) divided by 16 is encoded in the bits 
353 +//    UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK.
354 +// UNWIND_ARM64_MODE_DWARF:
355 +//    No compact unwind encoding is available.  Instead the low 24-bits of the
356 +//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.
357 +//    This mode is never used in object files.  It is only generated by the 
358 +//    linker in final linked images which have only DWARF unwind info for a
359 +//    function.
360 +//
361 +
362 +
363 +
364 +
365 +
366 +////////////////////////////////////////////////////////////////////////////////
367 +//
368 +//  Relocatable Object Files: __LD,__compact_unwind
369 +//
370 +////////////////////////////////////////////////////////////////////////////////
371 +
372 +//
373 +// A compiler can generated compact unwind information for a function by adding
374 +// a "row" to the __LD,__compact_unwind section.  This section has the 
375 +// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. 
376 +// It is removed by the new linker, so never ends up in final executables. 
377 +// This section is a table, initially with one row per function (that needs 
378 +// unwind info).  The table columns and some conceptual entries are:
379 +//
380 +//     range-start               pointer to start of function/range
381 +//     range-length              
382 +//     compact-unwind-encoding   32-bit encoding  
383 +//     personality-function      or zero if no personality function
384 +//     lsda                      or zero if no LSDA data
385 +//
386 +// The length and encoding fields are 32-bits.  The other are all pointer sized. 
387 +//
388 +// In x86_64 assembly, these entry would look like:
389 +//
390 +//     .section __LD,__compact_unwind,regular,debug
391 +//
392 +//     #compact unwind for _foo
393 +//     .quad    _foo
394 +//     .set     L1,LfooEnd-_foo
395 +//     .long    L1
396 +//     .long    0x01010001
397 +//     .quad    0
398 +//     .quad    0
399 +//
400 +//     #compact unwind for _bar
401 +//     .quad    _bar
402 +//     .set     L2,LbarEnd-_bar
403 +//     .long    L2
404 +//     .long    0x01020011
405 +//     .quad    __gxx_personality
406 +//     .quad    except_tab1
407 +//
408 +//
409 +// Notes: There is no need for any labels in the the __compact_unwind section.  
410 +//        The use of the .set directive is to force the evaluation of the 
411 +//        range-length at assembly time, instead of generating relocations.
412 +//
413 +// To support future compiler optimizations where which non-volatile registers 
414 +// are saved changes within a function (e.g. delay saving non-volatiles until
415 +// necessary), there can by multiple lines in the __compact_unwind table for one
416 +// function, each with a different (non-overlapping) range and each with 
417 +// different compact unwind encodings that correspond to the non-volatiles 
418 +// saved at that range of the function.
419 +//
420 +// If a particular function is so wacky that there is no compact unwind way
421 +// to encode it, then the compiler can emit traditional DWARF unwind info.  
422 +// The runtime will use which ever is available.
423 +//
424 +// Runtime support for compact unwind encodings are only available on 10.6 
425 +// and later.  So, the compiler should not generate it when targeting pre-10.6. 
426 +
427 +
428 +
429 +
430 +////////////////////////////////////////////////////////////////////////////////
431 +//
432 +//  Final Linked Images: __TEXT,__unwind_info
433 +//
434 +////////////////////////////////////////////////////////////////////////////////
435 +
436 +//
437 +// The __TEXT,__unwind_info section is laid out for an efficient two level lookup.
438 +// The header of the section contains a coarse index that maps function address
439 +// to the page (4096 byte block) containing the unwind info for that function.  
440 +//
441 +
442 +#define UNWIND_SECTION_VERSION 1
443 +struct unwind_info_section_header
444 +{
445 +    uint32_t    version;            // UNWIND_SECTION_VERSION
446 +    uint32_t    commonEncodingsArraySectionOffset;
447 +    uint32_t    commonEncodingsArrayCount;
448 +    uint32_t    personalityArraySectionOffset;
449 +    uint32_t    personalityArrayCount;
450 +    uint32_t    indexSectionOffset;
451 +    uint32_t    indexCount;
452 +    // compact_unwind_encoding_t[]
453 +    // uint32_t personalities[]
454 +    // unwind_info_section_header_index_entry[]
455 +    // unwind_info_section_header_lsda_index_entry[]
456 +};
457 +
458 +struct unwind_info_section_header_index_entry
459 +{
460 +    uint32_t        functionOffset;
461 +    uint32_t        secondLevelPagesSectionOffset;  // section offset to start of regular or compress page
462 +    uint32_t        lsdaIndexArraySectionOffset;    // section offset to start of lsda_index array for this range
463 +};
464 +
465 +struct unwind_info_section_header_lsda_index_entry
466 +{
467 +    uint32_t        functionOffset;
468 +    uint32_t        lsdaOffset;
469 +};
470 +
471 +//
472 +// There are two kinds of second level index pages: regular and compressed.
473 +// A compressed page can hold up to 1021 entries, but it cannot be used
474 +// if too many different encoding types are used.  The regular page holds
475 +// 511 entries.
476 +//
477 +
478 +struct unwind_info_regular_second_level_entry
479 +{
480 +    uint32_t                    functionOffset;
481 +    compact_unwind_encoding_t    encoding;
482 +};
483 +
484 +#define UNWIND_SECOND_LEVEL_REGULAR 2
485 +struct unwind_info_regular_second_level_page_header
486 +{
487 +    uint32_t    kind;    // UNWIND_SECOND_LEVEL_REGULAR
488 +    uint16_t    entryPageOffset;
489 +    uint16_t    entryCount;
490 +    // entry array
491 +};
492 +
493 +#define UNWIND_SECOND_LEVEL_COMPRESSED 3
494 +struct unwind_info_compressed_second_level_page_header
495 +{
496 +    uint32_t    kind;    // UNWIND_SECOND_LEVEL_COMPRESSED
497 +    uint16_t    entryPageOffset;
498 +    uint16_t    entryCount;
499 +    uint16_t    encodingsPageOffset;
500 +    uint16_t    encodingsCount;
501 +    // 32-bit entry array
502 +    // encodings array
503 +};
504 +
505 +#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET(entry)            (entry & 0x00FFFFFF)
506 +#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX(entry)        ((entry >> 24) & 0xFF)
507 +
508 +
509 +
510 +#endif
511 +
This page took 0.084968 seconds and 4 git commands to generate.