|
1 | 1 | ---
|
2 | 2 | title: "ARM64 exception handling"
|
3 | 3 | description: Describes the exception handling conventions and data used by windows on ARM64.
|
4 |
| -ms.date: 10/10/2022 |
| 4 | +ms.date: 01/13/2023 |
5 | 5 | ---
|
6 | 6 | # ARM64 exception handling
|
7 | 7 |
|
@@ -281,15 +281,15 @@ If exceptions were guaranteed to only ever occur within a function body, and nev
|
281 | 281 |
|
282 | 282 | - 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.
|
283 | 283 |
|
284 |
| -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 22 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. |
| 284 | +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 (`alloc_l`). There are 22 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. |
285 | 285 |
|
286 | 286 | | Unwind code | Bits and interpretation |
|
287 | 287 | |--|--|
|
288 | 288 | | `alloc_s` | 000xxxxx: allocate small stack with size \< 512 (2^5 * 16). |
|
289 | 289 | | `save_r19r20_x` | 001zzzzz: save `<x19,x20>` pair at `[sp-#Z*8]!`, pre-indexed offset >= -248 |
|
290 | 290 | | `save_fplr` | 01zzzzzz: save `<x29,lr>` pair at `[sp+#Z*8]`, offset \<= 504. |
|
291 | 291 | | `save_fplr_x` | 10zzzzzz: save `<x29,lr>` pair at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
|
292 |
| -| `alloc_m` | 11000xxx'xxxxxxxx: allocate large stack with size \< 16k (2^11 * 16). | |
| 292 | +| `alloc_m` | 11000xxx'xxxxxxxx: allocate large stack with size \< 32K (2^11 * 16). | |
293 | 293 | | `save_regp` | 110010xx'xxzzzzzz: save `x(19+#X)` pair at `[sp+#Z*8]`, offset \<= 504 |
|
294 | 294 | | `save_regp_x` | 110011xx'xxzzzzzz: save pair `x(19+#X)` at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
|
295 | 295 | | `save_reg` | 110100xx'xxzzzzzz: save reg `x(19+#X)` at `[sp+#Z*8]`, offset \<= 504 |
|
|
0 commit comments