@@ -108,7 +108,7 @@ enum {
108108// are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries.
109109// Each entry contains which register to restore.
110110// 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
112112// constant stack size. To return, a constant (encoded in the compact
113113// unwind encoding) is added to the ESP. Then the return is done by
114114// popping the stack into the pc.
@@ -119,16 +119,16 @@ enum {
119119// UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION contains which registers were
120120// saved and their order.
121121// 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
123123// 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
126126// encoding contains the offset to the nnnnnnnn value in the function in
127- // UNWIND_X86_FRAMELESS_STACK_SIZE.
127+ // UNWIND_X86_FRAMELESS_STACK_SIZE.
128128// UNWIND_X86_MODE_DWARF:
129129// No compact unwind encoding is available. Instead the low 24-bits of the
130130// 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
132132// linker in final linked images which have only DWARF unwind info for a
133133// function.
134134//
@@ -233,36 +233,36 @@ enum {
233233// For x86_64 there are four modes for the compact unwind encoding:
234234// UNWIND_X86_64_MODE_RBP_FRAME:
235235// 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
238238// is done by popping the stack once more into the pc.
239239// 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
241241// is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits. The registers saved
242242// 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.
244244// 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
248248// popping the stack into the pc.
249249// All non-volatile registers that need to be restored must have been saved
250250// on the stack immediately after the return address. The stack_size/8 is
251251// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048).
252252// The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT.
253253// UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION contains which registers were
254- // saved and their order.
254+ // saved and their order.
255255// 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
257257// 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
260260// 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.
262262// UNWIND_X86_64_MODE_DWARF:
263263// No compact unwind encoding is available. Instead the low 24-bits of the
264264// 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
266266// linker in final linked images which have only DWARF unwind info for a
267267// function.
268268//
@@ -307,20 +307,20 @@ enum {
307307// This is a standard arm64 prolog where FP/LR are immediately pushed on the
308308// stack, then SP is copied to FP. If there are any non-volatile registers
309309// 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
311311// and four D pairs can be saved, but the memory layout must be in register
312- // number order.
312+ // number order.
313313// 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
315315// remains in LR throughout the function. If any non-volatile registers
316316// are saved, they must be pushed onto the stack before any stack space is
317317// 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
319319// UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK.
320320// UNWIND_ARM64_MODE_DWARF:
321321// No compact unwind encoding is available. Instead the low 24-bits of the
322322// 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
324324// linker in final linked images which have only DWARF unwind info for a
325325// function.
326326//
@@ -337,19 +337,19 @@ enum {
337337
338338//
339339// 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
344344// unwind info). The table columns and some conceptual entries are:
345345//
346346// 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
349349// personality-function or zero if no personality function
350350// lsda or zero if no LSDA data
351351//
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.
353353//
354354// In x86_64 assembly, these entry would look like:
355355//
@@ -372,23 +372,23 @@ enum {
372372// .quad except_tab1
373373//
374374//
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
377377// range-length at assembly time, instead of generating relocations.
378378//
379- // To support future compiler optimizations where which non-volatile registers
379+ // To support future compiler optimizations where which non-volatile registers
380380// are saved changes within a function (e.g. delay saving non-volatiles until
381381// 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
384384// saved at that range of the function.
385385//
386386// 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.
388388// The runtime will use which ever is available.
389389//
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.
392392
393393
394394
@@ -402,7 +402,7 @@ enum {
402402//
403403// The __TEXT,__unwind_info section is laid out for an efficient two level lookup.
404404// 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.
406406//
407407
408408#define UNWIND_SECTION_VERSION 1
0 commit comments