diff mbox series

[kvm-unit-tests,v3,1/7] s390x: Fix fpc store address in RESTORE_REGS_STACK

Message ID 20210222085756.14396-2-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: Cleanup exception register save/restore and implement backtrace | expand

Commit Message

Janosch Frank Feb. 22, 2021, 8:57 a.m. UTC
The efpc stores in bits 32-63 of a register and we store a full 8
bytes to have the stack 8 byte aligned. This means that the fpc is
stored at offset 4 but we load it from offset 0. Lets replace efpc
with stfpc and get rid of the stg to store at offset 0.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
 s390x/macros.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series


diff --git a/s390x/macros.S b/s390x/macros.S
index 37a6a63e..e51a557a 100644
--- a/s390x/macros.S
+++ b/s390x/macros.S
@@ -54,8 +54,7 @@ 
 	/* Save fpc, but keep stack aligned on 64bits */
 	slgfi   %r15, 8
-	efpc	%r0
-	stg	%r0, 0(%r15)
+	stfpc	0(%r15)
 /* Restore the register in reverse order */