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/powerpc/include Pull up revision 1.2 (requeste...
details: https://anonhg.NetBSD.org/src/rev/d0cf5e3ab1f3
branches: netbsd-1-4
changeset: 470110:d0cf5e3ab1f3
user: he <he%NetBSD.org@localhost>
date: Thu Jan 20 21:27:54 2000 +0000
description:
Pull up revision 1.2 (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/powerpc/include/trap.h | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diffs (32 lines):
diff -r 88f7c7799b64 -r d0cf5e3ab1f3 sys/arch/powerpc/include/trap.h
--- a/sys/arch/powerpc/include/trap.h Thu Jan 20 21:27:14 2000 +0000
+++ b/sys/arch/powerpc/include/trap.h Thu Jan 20 21:27:54 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.h,v 1.1 1996/09/30 16:34:35 ws Exp $ */
+/* $NetBSD: trap.h,v 1.1.22.1 2000/01/20 21:27:54 he Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -64,4 +64,22 @@
/* Trap was in user mode */
#define EXC_USER 0x10000
+
+/*
+ * EXC_ALI sets bits in the DSISR and DAR to provide enough
+ * information to recover from the unaligned access without needing to
+ * parse the offending instruction. This includes certain bits of the
+ * opcode, and information about what registers are used. The opcode
+ * indicator values below come from Appendix F of Book III of "The
+ * PowerPC Architecture".
+ */
+
+#define EXC_ALI_OPCODE_INDICATOR(dsisr) ((dsisr >> 10) & 0x7f)
+#define EXC_ALI_LFD 0x09
+#define EXC_ALI_STFD 0x0b
+
+/* Macros to extract register information */
+#define EXC_ALI_RST(dsisr) ((dsisr >> 5) & 0x1f) /* source or target */
+#define EXC_ALI_RA(dsisr) (dsisr & 0x1f)
+
#endif /* _MACHINE_TRAP_H_ */
Home |
Main Index |
Thread Index |
Old Index