diff --git a/docs/CodeGenerator.html b/docs/CodeGenerator.html index aba7b1bcf5d..53c2b54d36a 100644 --- a/docs/CodeGenerator.html +++ b/docs/CodeGenerator.html @@ -1813,12 +1813,14 @@ $ llc -regalloc=pbqp file.bc -o pbqp.s;
Unwinding out of a function is done virually via DWARF encodings. These - encodings exist in two forms: a Common Information Entry (CIE) and a Frame - Description Entry (FDE). These two tables contain the information necessary - for the unwinder to restore the state of the computer to before the function - was called. However, the tables themselves are rather large. LLVM can use a - "compact unwind" encoding to represent the virtual unwinding.
+Throwing an exception requires unwinding out of a function. The + information on how to unwind a given function is traditionally expressed in + DWARF unwind (a.k.a. frame) info. But that format was originally developed + for debuggers to backtrace, and each Frame Description Entry (FDE) requires + ~20-30 bytes per function. There is also the cost of mapping from an address + in a function to the corresponding FDE at runtime. An alternative unwind + encoding is called compact unwind and requires just 4-bytes per + function.
The compact unwind encoding is a 32-bit value, which is encoded in an architecture-specific way. It specifies which registers to restore and from @@ -1834,7 +1836,7 @@ $ llc -regalloc=pbqp file.bc -o pbqp.s;
For X86, there are three modes for the compact unwind encoding:
-EBP
or RBP
)EBP/RBP
-based frame, where EBP/RBP
is pushed
onto the stack immediately after the return address,
@@ -1845,10 +1847,11 @@ $ llc -regalloc=pbqp file.bc -o pbqp.s;
more into the PC. All non-volatile registers that need to be restored must
have been saved in a small range on the stack that
starts EBP-4
to EBP-1020
(RBP-8
- to RBP-1020
). The offset (divided by 4) is encoded in bits
- 16-23 (mask: 0x00FF0000
). The registers saved are encoded in
- bits 0-14 (mask: 0x00007FFF
) as five 3-bit entries from the
- following table:
RBP-1020
). The offset (divided by 4 in 32-bit mode and 8
+ in 64-bit mode) is encoded in bits 16-23 (mask: 0x00FF0000
).
+ The registers saved are encoded in bits 0-14
+ (mask: 0x00007FFF
) as five 3-bit entries from the following
+ table:
Compact Number | @@ -1895,13 +1898,14 @@ $ llc -regalloc=pbqp file.bc -o pbqp.s; to the
---|