@@ -108,7 +108,7 @@ enum {
108
108
// are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries.
109
109
// Each entry contains which register to restore.
110
110
// UNWIND_X86_MODE_STACK_IMMD:
111
- // A "frameless" (EBP not used as frame pointer) function with a small
111
+ // A "frameless" (EBP not used as frame pointer) function with a small
112
112
// constant stack size. To return, a constant (encoded in the compact
113
113
// unwind encoding) is added to the ESP. Then the return is done by
114
114
// popping the stack into the pc.
@@ -119,16 +119,16 @@ enum {
119
119
// UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION contains which registers were
120
120
// saved and their order.
121
121
// UNWIND_X86_MODE_STACK_IND:
122
- // A "frameless" (EBP not used as frame pointer) function large constant
122
+ // A "frameless" (EBP not used as frame pointer) function large constant
123
123
// stack size. This case is like the previous, except the stack size is too
124
- // large to encode in the compact unwind encoding. Instead it requires that
125
- // the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact
124
+ // large to encode in the compact unwind encoding. Instead it requires that
125
+ // the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact
126
126
// encoding contains the offset to the nnnnnnnn value in the function in
127
- // UNWIND_X86_FRAMELESS_STACK_SIZE.
127
+ // UNWIND_X86_FRAMELESS_STACK_SIZE.
128
128
// UNWIND_X86_MODE_DWARF:
129
129
// No compact unwind encoding is available. Instead the low 24-bits of the
130
130
// compact encoding is the offset of the DWARF FDE in the __eh_frame section.
131
- // This mode is never used in object files. It is only generated by the
131
+ // This mode is never used in object files. It is only generated by the
132
132
// linker in final linked images which have only DWARF unwind info for a
133
133
// function.
134
134
//
@@ -233,36 +233,36 @@ enum {
233
233
// For x86_64 there are four modes for the compact unwind encoding:
234
234
// UNWIND_X86_64_MODE_RBP_FRAME:
235
235
// RBP based frame where RBP is push on stack immediately after return address,
236
- // then RSP is moved to RBP. Thus, to unwind RSP is restored with the current
237
- // EPB value, then RBP is restored by popping off the stack, and the return
236
+ // then RSP is moved to RBP. Thus, to unwind RSP is restored with the current
237
+ // EPB value, then RBP is restored by popping off the stack, and the return
238
238
// is done by popping the stack once more into the pc.
239
239
// All non-volatile registers that need to be restored must have been saved
240
- // in a small range in the stack that starts RBP-8 to RBP-2040. The offset/8
240
+ // in a small range in the stack that starts RBP-8 to RBP-2040. The offset/8
241
241
// is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits. The registers saved
242
242
// are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries.
243
- // Each entry contains which register to restore.
243
+ // Each entry contains which register to restore.
244
244
// UNWIND_X86_64_MODE_STACK_IMMD:
245
- // A "frameless" (RBP not used as frame pointer) function with a small
246
- // constant stack size. To return, a constant (encoded in the compact
247
- // unwind encoding) is added to the RSP. Then the return is done by
245
+ // A "frameless" (RBP not used as frame pointer) function with a small
246
+ // constant stack size. To return, a constant (encoded in the compact
247
+ // unwind encoding) is added to the RSP. Then the return is done by
248
248
// popping the stack into the pc.
249
249
// All non-volatile registers that need to be restored must have been saved
250
250
// on the stack immediately after the return address. The stack_size/8 is
251
251
// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048).
252
252
// The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT.
253
253
// UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION contains which registers were
254
- // saved and their order.
254
+ // saved and their order.
255
255
// UNWIND_X86_64_MODE_STACK_IND:
256
- // A "frameless" (RBP not used as frame pointer) function large constant
256
+ // A "frameless" (RBP not used as frame pointer) function large constant
257
257
// stack size. This case is like the previous, except the stack size is too
258
- // large to encode in the compact unwind encoding. Instead it requires that
259
- // the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact
258
+ // large to encode in the compact unwind encoding. Instead it requires that
259
+ // the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact
260
260
// encoding contains the offset to the nnnnnnnn value in the function in
261
- // UNWIND_X86_64_FRAMELESS_STACK_SIZE.
261
+ // UNWIND_X86_64_FRAMELESS_STACK_SIZE.
262
262
// UNWIND_X86_64_MODE_DWARF:
263
263
// No compact unwind encoding is available. Instead the low 24-bits of the
264
264
// compact encoding is the offset of the DWARF FDE in the __eh_frame section.
265
- // This mode is never used in object files. It is only generated by the
265
+ // This mode is never used in object files. It is only generated by the
266
266
// linker in final linked images which have only DWARF unwind info for a
267
267
// function.
268
268
//
@@ -307,20 +307,20 @@ enum {
307
307
// This is a standard arm64 prolog where FP/LR are immediately pushed on the
308
308
// stack, then SP is copied to FP. If there are any non-volatile registers
309
309
// saved, then are copied into the stack frame in pairs in a contiguous
310
- // range right below the saved FP/LR pair. Any subset of the five X pairs
310
+ // range right below the saved FP/LR pair. Any subset of the five X pairs
311
311
// and four D pairs can be saved, but the memory layout must be in register
312
- // number order.
312
+ // number order.
313
313
// UNWIND_ARM64_MODE_FRAMELESS:
314
- // A "frameless" leaf function, where FP/LR are not saved. The return address
314
+ // A "frameless" leaf function, where FP/LR are not saved. The return address
315
315
// remains in LR throughout the function. If any non-volatile registers
316
316
// are saved, they must be pushed onto the stack before any stack space is
317
317
// allocated for local variables. The stack sized (including any saved
318
- // non-volatile registers) divided by 16 is encoded in the bits
318
+ // non-volatile registers) divided by 16 is encoded in the bits
319
319
// UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK.
320
320
// UNWIND_ARM64_MODE_DWARF:
321
321
// No compact unwind encoding is available. Instead the low 24-bits of the
322
322
// compact encoding is the offset of the DWARF FDE in the __eh_frame section.
323
- // This mode is never used in object files. It is only generated by the
323
+ // This mode is never used in object files. It is only generated by the
324
324
// linker in final linked images which have only DWARF unwind info for a
325
325
// function.
326
326
//
@@ -337,19 +337,19 @@ enum {
337
337
338
338
//
339
339
// A compiler can generated compact unwind information for a function by adding
340
- // a "row" to the __LD,__compact_unwind section. This section has the
341
- // S_ATTR_DEBUG bit set, so the section will be ignored by older linkers.
342
- // It is removed by the new linker, so never ends up in final executables.
343
- // This section is a table, initially with one row per function (that needs
340
+ // a "row" to the __LD,__compact_unwind section. This section has the
341
+ // S_ATTR_DEBUG bit set, so the section will be ignored by older linkers.
342
+ // It is removed by the new linker, so never ends up in final executables.
343
+ // This section is a table, initially with one row per function (that needs
344
344
// unwind info). The table columns and some conceptual entries are:
345
345
//
346
346
// range-start pointer to start of function/range
347
- // range-length
348
- // compact-unwind-encoding 32-bit encoding
347
+ // range-length
348
+ // compact-unwind-encoding 32-bit encoding
349
349
// personality-function or zero if no personality function
350
350
// lsda or zero if no LSDA data
351
351
//
352
- // The length and encoding fields are 32-bits. The other are all pointer sized.
352
+ // The length and encoding fields are 32-bits. The other are all pointer sized.
353
353
//
354
354
// In x86_64 assembly, these entry would look like:
355
355
//
@@ -372,23 +372,23 @@ enum {
372
372
// .quad except_tab1
373
373
//
374
374
//
375
- // Notes: There is no need for any labels in the the __compact_unwind section.
376
- // The use of the .set directive is to force the evaluation of the
375
+ // Notes: There is no need for any labels in the the __compact_unwind section.
376
+ // The use of the .set directive is to force the evaluation of the
377
377
// range-length at assembly time, instead of generating relocations.
378
378
//
379
- // To support future compiler optimizations where which non-volatile registers
379
+ // To support future compiler optimizations where which non-volatile registers
380
380
// are saved changes within a function (e.g. delay saving non-volatiles until
381
381
// necessary), there can by multiple lines in the __compact_unwind table for one
382
- // function, each with a different (non-overlapping) range and each with
383
- // different compact unwind encodings that correspond to the non-volatiles
382
+ // function, each with a different (non-overlapping) range and each with
383
+ // different compact unwind encodings that correspond to the non-volatiles
384
384
// saved at that range of the function.
385
385
//
386
386
// If a particular function is so wacky that there is no compact unwind way
387
- // to encode it, then the compiler can emit traditional DWARF unwind info.
387
+ // to encode it, then the compiler can emit traditional DWARF unwind info.
388
388
// The runtime will use which ever is available.
389
389
//
390
- // Runtime support for compact unwind encodings are only available on 10.6
391
- // and later. So, the compiler should not generate it when targeting pre-10.6.
390
+ // Runtime support for compact unwind encodings are only available on 10.6
391
+ // and later. So, the compiler should not generate it when targeting pre-10.6.
392
392
393
393
394
394
@@ -402,7 +402,7 @@ enum {
402
402
//
403
403
// The __TEXT,__unwind_info section is laid out for an efficient two level lookup.
404
404
// The header of the section contains a coarse index that maps function address
405
- // to the page (4096 byte block) containing the unwind info for that function.
405
+ // to the page (4096 byte block) containing the unwind info for that function.
406
406
//
407
407
408
408
#define UNWIND_SECTION_VERSION 1
0 commit comments