diff options
author | Nick Kledzik <kledzik@apple.com> | 2014-12-20 01:22:54 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2014-12-20 01:22:54 +0000 |
commit | f11e8eab527fba316c64112f6e05de1a79693a3e (patch) | |
tree | a8b827155a59af8be2b659df38530df9e3675550 /libcxxabi | |
parent | fcf7c85c43d35ad70b32778bb0bd4595d093aa27 (diff) | |
download | llvm-f11e8eab527fba316c64112f6e05de1a79693a3e.zip llvm-f11e8eab527fba316c64112f6e05de1a79693a3e.tar.gz llvm-f11e8eab527fba316c64112f6e05de1a79693a3e.tar.bz2 |
[libunwind] improve x86_64 comments in compact_unwind_encoding.h
llvm-svn: 224657
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/include/mach-o/compact_unwind_encoding.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libcxxabi/include/mach-o/compact_unwind_encoding.h b/libcxxabi/include/mach-o/compact_unwind_encoding.h index 8d5ee7d..b71c2c8 100644 --- a/libcxxabi/include/mach-o/compact_unwind_encoding.h +++ b/libcxxabi/include/mach-o/compact_unwind_encoding.h @@ -133,6 +133,10 @@ enum { // linker in final linked images which have only dwarf unwind info for a // function. // +// The permutation encoding is a Lehmer code sequence encoded into a +// single variable-base number so we can encode the ordering of up to +// six registers in a 10-bit space. +// // The following is the algorithm used to create the permutation encoding used // with frameless stacks. It is passed the number of registers to be saved and // an array of the register numbers saved. @@ -234,7 +238,7 @@ enum { // EPB value, then RBP is restored by popping off the stack, and the return // is done by popping the stack once more into the pc. // All non-volatile registers that need to be restored must have been saved -// in a small range in the stack that starts RBP-8 to RBP-1020. The offset/4 +// in a small range in the stack that starts RBP-8 to RBP-2040. The offset/8 // is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits. The registers saved // are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries. // Each entry contains which register to restore. @@ -244,8 +248,8 @@ enum { // unwind encoding) is added to the RSP. Then the return is done by // popping the stack into the pc. // All non-volatile registers that need to be restored must have been saved -// on the stack immediately after the return address. The stack_size/4 is -// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 1024). +// on the stack immediately after the return address. The stack_size/8 is +// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048). // The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT. // UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were // saved and their order. |