From 2008082e6fd69ec30ec3e2220f6ca28dd3aa73ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 28 Nov 2025 21:10:35 +0200 Subject: [PATCH 1/4] Clarify docs for arm64 packed unwind, RegI=0 RegF>0 The condition CR=0 isn't correct here; the same about the first store for float registers doing the predecrement for any variant where there are no integer registers stored before the floats - this goes for both CR=0, CR=2 and CR=3. --- docs/build/arm64-exception-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/arm64-exception-handling.md b/docs/build/arm64-exception-handling.md index d459965ede4..6c82d44da4c 100644 --- a/docs/build/arm64-exception-handling.md +++ b/docs/build/arm64-exception-handling.md @@ -401,7 +401,7 @@ Step 6: Allocate remaining stack, including local area, `` pair, and out \* If **CR** == 01 and **RegI** is an odd number, step 3 and the last `save_reg` in step 2 are merged into one `save_regp`. -\*\* If **RegI** == **CR** == 0, and **RegF** != 0, the first `stp` for the floating-point does the predecrement. +\*\* If **RegI** == 0, **CR** != 01, and **RegF** != 0, the first `stp` for the floating-point does the predecrement. \*\*\* No instruction corresponding to `mov x29,sp` is present in the epilog. Packed unwind data can't be used if a function requires restoration of `sp` from `x29`. From 917032bc35b765033db0c76c621e23605c94b665 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Fri, 27 Feb 2026 15:27:49 -0800 Subject: [PATCH 2/4] Clarify floating-point predecrement behavior --- docs/build/arm64-exception-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/arm64-exception-handling.md b/docs/build/arm64-exception-handling.md index 6c82d44da4c..3742b4cef7b 100644 --- a/docs/build/arm64-exception-handling.md +++ b/docs/build/arm64-exception-handling.md @@ -401,7 +401,7 @@ Step 6: Allocate remaining stack, including local area, `` pair, and out \* If **CR** == 01 and **RegI** is an odd number, step 3 and the last `save_reg` in step 2 are merged into one `save_regp`. -\*\* If **RegI** == 0, **CR** != 01, and **RegF** != 0, the first `stp` for the floating-point does the predecrement. +\*\* If **RegI** == 0, **CR** != 01, and **RegF** != 0, the first `stp` for the floating-point does the predecrement (that is, it accounts for the FP/SIMD save area). \*\*\* No instruction corresponding to `mov x29,sp` is present in the epilog. Packed unwind data can't be used if a function requires restoration of `sp` from `x29`. From 6ee11267f4bd6d2037d894e284c93b53d6f494fc Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Fri, 27 Feb 2026 15:31:04 -0800 Subject: [PATCH 3/4] Update ARM64 exception handling documentation Clarify the description of the floating-point predecrement behavior --- docs/build/arm64-exception-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/arm64-exception-handling.md b/docs/build/arm64-exception-handling.md index 3742b4cef7b..1ff68237edf 100644 --- a/docs/build/arm64-exception-handling.md +++ b/docs/build/arm64-exception-handling.md @@ -401,7 +401,7 @@ Step 6: Allocate remaining stack, including local area, `` pair, and out \* If **CR** == 01 and **RegI** is an odd number, step 3 and the last `save_reg` in step 2 are merged into one `save_regp`. -\*\* If **RegI** == 0, **CR** != 01, and **RegF** != 0, the first `stp` for the floating-point does the predecrement (that is, it accounts for the FP/SIMD save area). +\*\* If **RegI** == 0, **CR** != 01, and **RegF** != 0, the first `stp` for the floating-point does the predecrement to allocate space for the FP/SIMD save area. \*\*\* No instruction corresponding to `mov x29,sp` is present in the epilog. Packed unwind data can't be used if a function requires restoration of `sp` from `x29`. From 5dca165413c231af257cd66a6daeef06d7738b50 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Fri, 27 Feb 2026 15:32:48 -0800 Subject: [PATCH 4/4] Update explanation for floating-point save area allocation Clarify the predecrement description --- docs/build/arm64-exception-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/arm64-exception-handling.md b/docs/build/arm64-exception-handling.md index 1ff68237edf..dc383c44181 100644 --- a/docs/build/arm64-exception-handling.md +++ b/docs/build/arm64-exception-handling.md @@ -401,7 +401,7 @@ Step 6: Allocate remaining stack, including local area, `` pair, and out \* If **CR** == 01 and **RegI** is an odd number, step 3 and the last `save_reg` in step 2 are merged into one `save_regp`. -\*\* If **RegI** == 0, **CR** != 01, and **RegF** != 0, the first `stp` for the floating-point does the predecrement to allocate space for the FP/SIMD save area. +\*\* If **RegI** == 0, **CR** != 01, and **RegF** != 0, the first `stp` for the floating-point does the predecrement to adjust sp to allocate space for the FP/SIMD save area. \*\*\* No instruction corresponding to `mov x29,sp` is present in the epilog. Packed unwind data can't be used if a function requires restoration of `sp` from `x29`.