[PATCH 2/8] Fix delivery of unaligned access exceptions.

Jason Thorpe posted 8 patches 4 years, 8 months ago
[PATCH 2/8] Fix delivery of unaligned access exceptions.
Posted by Jason Thorpe 4 years, 8 months ago
In the unaligned access exception vector, actually pass the return PC
in the exception frame.  This is required in order for unaligned access
fixup handlers in the operating system to work.

Signed-off-by: Jason Thorpe <thorpej@me.com>
---
 pal.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pal.S b/pal.S
index 64941a8..015a829 100644
--- a/pal.S
+++ b/pal.S
@@ -278,7 +278,7 @@ Pal_Unalign:
 	blbs	p6, MchkBugCheck
 	addq	p6, 4, p6		// increment past the faulting insn
 
-	STACK_FRAME p0, p1, p2, 1
+	STACK_FRAME p0, p6, p2, 1
 
 	mfpr	p0, ptEntUna
 	mfpr	$gp, ptKgp
-- 
2.30.2


Re: [PATCH 2/8] Fix delivery of unaligned access exceptions.
Posted by Richard Henderson 4 years, 8 months ago
On 6/2/21 8:53 PM, Jason Thorpe wrote:
> In the unaligned access exception vector, actually pass the return PC
> in the exception frame.  This is required in order for unaligned access
> fixup handlers in the operating system to work.
> 
> Signed-off-by: Jason Thorpe<thorpej@me.com>
> ---
>   pal.S | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Ouch.  Good catch.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~