[libcxxabi] r224657 - [libunwind] improve x86_64 comments in compact_unwind_encoding.h
Nick Kledzik
kledzik at apple.com
Fri Dec 19 17:22:54 PST 2014
Author: kledzik
Date: Fri Dec 19 19:22:54 2014
New Revision: 224657
URL: http://llvm.org/viewvc/llvm-project?rev=224657&view=rev
Log:
[libunwind] improve x86_64 comments in compact_unwind_encoding.h
Modified:
libcxxabi/trunk/include/mach-o/compact_unwind_encoding.h
Modified: libcxxabi/trunk/include/mach-o/compact_unwind_encoding.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/include/mach-o/compact_unwind_encoding.h?rev=224657&r1=224656&r2=224657&view=diff
==============================================================================
--- libcxxabi/trunk/include/mach-o/compact_unwind_encoding.h (original)
+++ libcxxabi/trunk/include/mach-o/compact_unwind_encoding.h Fri Dec 19 19:22:54 2014
@@ -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.
More information about the cfe-commits
mailing list