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/ofppc/ofppc Pull up revision 1.14 (requested b...
details: https://anonhg.NetBSD.org/src/rev/51886a159e4b
branches: netbsd-1-4
changeset: 470108:51886a159e4b
user: he <he%NetBSD.org@localhost>
date: Thu Jan 20 21:26:15 2000 +0000
description:
Pull up revision 1.14 (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/ofppc/ofppc/locore.S | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r 266c0ddea3b2 -r 51886a159e4b sys/arch/ofppc/ofppc/locore.S
--- a/sys/arch/ofppc/ofppc/locore.S Thu Jan 20 21:24:21 2000 +0000
+++ b/sys/arch/ofppc/ofppc/locore.S Thu Jan 20 21:26:15 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.11 1999/03/25 00:41:47 mrg Exp $ */
+/* $NetBSD: locore.S,v 1.11.2.1 2000/01/20 21:26:15 he Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -443,8 +443,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)
@@ -465,6 +465,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