Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/macppc/macppc Pull up revision 1.19 (requested...
details: https://anonhg.NetBSD.org/src/rev/22bdd3ce2636
branches: netbsd-1-4
changeset: 470106:22bdd3ce2636
user: he <he%NetBSD.org@localhost>
date: Thu Jan 20 21:23:57 2000 +0000
description:
Pull up revision 1.19 (requested by danw):
Add (the beginnings of) an unaligned access handler for the
powerpc, to get around the fact that gcc currently generates bad
floating point copies sometimes, which breaks various things,
diffstat:
sys/arch/macppc/macppc/locore.S | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r d4bcb073b4ba -r 22bdd3ce2636 sys/arch/macppc/macppc/locore.S
--- a/sys/arch/macppc/macppc/locore.S Thu Jan 20 21:22:51 2000 +0000
+++ b/sys/arch/macppc/macppc/locore.S Thu Jan 20 21:23:57 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.13 1999/03/25 00:41:47 mrg Exp $ */
+/* $NetBSD: locore.S,v 1.13.2.1 2000/01/20 21:23:57 he Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -508,8 +508,8 @@
/*
* This code gets copied to all the trap vectors
- * (except ISI/DSI, the interrupts, and possibly the debugging traps when
- * using IPKDB).
+ * (except ISI/DSI, ALI, the interrupts, and possibly the debugging
+ * traps when using IPKDB).
*/
.text
.globl _C_LABEL(trapcode),_C_LABEL(trapsize)
@@ -530,6 +530,29 @@
_C_LABEL(trapsize) = .-_C_LABEL(trapcode)
/*
+ * For ALI: has to save DSISR and DAR
+ */
+ .globl _C_LABEL(alitrap),_C_LABEL(alisize)
+_C_LABEL(alitrap):
+ mtsprg 1,1 /* save SP */
+ stmw 28,tempsave(0) /* free r28-r31 */
+ mfdar 30
+ mfdsisr 31
+ stmw 30,tempsave+16(0)
+ mflr 28 /* save LR */
+ mfcr 29 /* save CR */
+/* Test whether we already had PR set */
+ mfsrr1 31
+ mtcr 31
+ bc 4,17,1f /* branch if PSL_PR is clear */
+ lis 1,_C_LABEL(curpcb)@ha
+ lwz 1,_C_LABEL(curpcb)@l(1)
+ addi 1,1,USPACE /* stack is top of user struct */
+1:
+ bla s_trap
+_C_LABEL(alisize) = .-_C_LABEL(alitrap)
+
+/*
* Similar to the above for DSI
* Has to handle BAT spills
* and standard pagetable spills
Home |
Main Index |
Thread Index |
Old Index