Skip to content

Commit 3ed82bc

Browse files
authored
Merge branch 'live' into main
2 parents d6d4c47 + 7bce43f commit 3ed82bc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/build/arm64-exception-handling.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ The exception unwinding data conventions, and this description, are intended to:
1515

1616
- Analyzing the code requires the code to be paged in. It prevents unwinding in some circumstances where it's useful (tracing, sampling, debugging).
1717

18+
1819
- Analyzing the code is complex; the compiler must be careful to only generate instructions that the unwinder can decode.
1920

2021
- If unwinding can't be fully described by using unwind codes, then in some cases it must fall back to instruction decoding. Instruction decoding increases the overall complexity, and ideally should be avoided.
2122

23+
2224
- Support unwinding in mid-prolog and mid-epilog.
2325

2426
- Unwinding is used in Windows for more than exception handling. It's critical that code can unwind accurately even when in the middle of a prolog or epilog code sequence.
@@ -275,12 +277,14 @@ The array of unwind codes is a pool of sequences that describe exactly how to un
275277

276278
If exceptions were guaranteed to only ever occur within a function body, and never within a prolog or any epilog, then only a single sequence would be necessary. However, the Windows unwinding model requires that code can unwind from within a partially executed prolog or epilog. To meet this requirement, the unwind codes have been carefully designed so they unambiguously map 1:1 to each relevant opcode in the prolog and epilog. This design has several implications:
277279

280+
278281
- By counting the number of unwind codes, it's possible to compute the length of the prolog and epilog.
279282

280283
- By counting the number of instructions past the start of an epilog scope, it's possible to skip the equivalent number of unwind codes. We can execute the rest of a sequence to complete the partially executed unwind done by the epilog.
281284

282285
- By counting the number of instructions before the end of the prolog, it's possible to skip the equivalent number of unwind codes. We can execute the rest of the sequence to undo only those parts of the prolog that have completed execution.
283286

287+
284288
The unwind codes are encoded according to the table below. All unwind codes are a single/double byte, except the one that allocates a huge stack. There are 21 unwind codes in total. Each unwind code maps exactly one instruction in the prolog/epilog, to allow for unwinding of partially executed prologs and epilogs.
285289

286290
| Unwind code | Bits and interpretation |

docs/c-language/c-operators.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ ms.assetid: 13bc4c8e-2dc9-4b23-9f3a-25064e8777ed
99

1010
The C operators are a subset of the [C++ built-in operators](../cpp/cpp-built-in-operators-precedence-and-associativity.md).
1111

12+
1213
There are three types of operators. A unary expression consists of either a unary operator followed by an operand, or the **`sizeof`** or **`_Alignof`** keyword followed by an expression. The expression can be either the name of a variable or a cast expression. If the expression is a cast expression, it must be enclosed in parentheses. A binary expression consists of two operands joined by a binary operator. A ternary expression consists of three operands joined by the conditional-expression operator.
1314

15+
1416
C includes the following unary operators:
1517

1618
| Symbol | Name |

0 commit comments

Comments
 (0)