summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa64/hppa64/locore.S27
1 files changed, 12 insertions, 15 deletions
diff --git a/sys/arch/hppa64/hppa64/locore.S b/sys/arch/hppa64/hppa64/locore.S
index 9cae3aeaa25..a7143f21340 100644
--- a/sys/arch/hppa64/hppa64/locore.S
+++ b/sys/arch/hppa64/hppa64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.38 2011/09/18 13:46:22 kettenis Exp $ */
+/* $OpenBSD: locore.S,v 1.39 2011/09/18 14:05:38 kettenis Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -619,11 +619,6 @@ $syscall_return
mtctl %arg2, %cr0
mtctl %arg3, %cr10
- ldd TF_IOR(%arg0), %arg2 /* ior */
- ldd TF_ISR(%arg0), %arg3 /* isr */
- mtctl %arg2, %cr27
- mtsp %arg3, %sr6
-
ldd TF_SAR(%arg0), %arg2 /* sar */
ldd TF_VTOP(%arg0), %arg3 /* vtop */
mtctl %arg2, %sar
@@ -900,8 +895,11 @@ ENTRY(TLABEL(all),0)
extrd,u %r8, 63, SID_SHIFT, %r16
depd %r16, 31, SID_SHIFT, %r9
depd %r0, 63, SID_SHIFT, %r8
- mtsp %r8, %sr6
- mtctl %r9, %cr27
+
+ mfctl %cr24, %r24
+ ldo CI_TRAP_SAVE(%r24), %r24
+ std %r9, 2*8(%r24) /* ior */
+ std %r8, 3*8(%r24) /* isr */
mfctl %pcsq, %r24
mtctl %r0, %pcsq
@@ -1000,7 +998,7 @@ TLABEL(all_virt)
std,ma %arg3, 8(%sr3,%sp) /* %sr1 */
mfsp %sr2, %arg2
- mfsp %sr3, %arg3
+ mfsp %sr2, %arg3 /* XXX */
std,ma %arg2, 8(%sr3,%sp) /* %sr2 */
std,ma %arg3, 8(%sr3,%sp) /* %sr3 */
@@ -1043,12 +1041,7 @@ TLABEL(all_virt)
std,ma %arg2, 8(%sr3,%sp) /* eiem */
std,ma %arg3, 8(%sr3,%sp) /* eirr */
- mfctl %cr27, %arg2
- mfsp %sr6, %arg3
- std,ma %arg2, 8(%sr3,%sp) /* ior */
- std,ma %arg3, 8(%sr3,%sp) /* isr */
-
- ldo 8(%sp), %sp /* iir */
+ ldo 24(%sp), %sp /* ior, isr, iir */
mfctl %cr31, %arg3
std,ma %arg3, 8(%sr3,%sp) /* ipsw */
@@ -1081,6 +1074,10 @@ TLABEL(all_virt)
ldd 1*8(%r1), %arg3
std %arg2, TF_SP(%arg1)
std %arg3, TF_IIR(%arg1)
+ ldd 2*8(%r1), %arg2
+ ldd 3*8(%r1), %arg3
+ std %arg2, TF_IOR(%arg1)
+ std %arg3, TF_ISR(%arg1)
ldo TRAPFRAME_SIZEOF(%arg1), %sp
copy %sp, %r3