Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-1]: src/sys/arch/acorn26/acorn26 Pull up following revision(s) ...
details: https://anonhg.NetBSD.org/src/rev/e8d2b5aef1f2
branches: netbsd-2-1
changeset: 564228:e8d2b5aef1f2
user: bouyer <bouyer%NetBSD.org@localhost>
date: Tue Oct 17 18:24:01 2006 +0000
description:
Pull up following revision(s) (requested by bjh21 in ticket #10716):
sys/arch/acorn26/acorn26/except.c: revision 1.17
Correctly calculate fault addresses for instructions like:
ldr rX, [rY, rZ, ror #16]
and even:
ldr rX, [rY, rZ, rrx]
Why anyone would want such an instruction is beyond me, but it's nice not to
panic if they do. Also this makes regress/sys/arch/arm/abort-fixup pass.
diffstat:
sys/arch/acorn26/acorn26/except.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 240d7c810b53 -r e8d2b5aef1f2 sys/arch/acorn26/acorn26/except.c
--- a/sys/arch/acorn26/acorn26/except.c Mon Oct 16 17:59:15 2006 +0000
+++ b/sys/arch/acorn26/acorn26/except.c Tue Oct 17 18:24:01 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: except.c,v 1.7 2003/11/30 13:22:32 bjh21 Exp $ */
+/* $NetBSD: except.c,v 1.7.16.1 2006/10/17 18:24:01 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 Ben Harris
* All rights reserved.
@@ -31,7 +31,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.7 2003/11/30 13:22:32 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.7.16.1 2006/10/17 18:24:01 bouyer Exp $");
#include "opt_ddb.h"
#include "opt_ktrace.h"
@@ -318,7 +318,7 @@
/* immediate shift */
shift = (insn & 0x00000f80) >> 7;
else
- goto croak; /* register shifts can't happen in ARMv2 */
+ goto croak; /* Undefined instruction */
switch ((insn & 0x00000060) >> 5) {
case 0: /* Logical left */
offset = (int)(((u_int)offset) << shift);
@@ -331,9 +331,13 @@
if (shift == 0) shift = 32;
offset = (int)(((int)offset) >> shift);
break;
- case 3: /* Rotate right -- FIXME support this*/
- default: /* help GCC */
- goto croak;
+ case 3:
+ if (shift == 0) /* Rotate Right Extended */
+ offset = (int)((tf->tf_r15 & R15_FLAG_C) << 2 |
+ ((u_int)offset) >> 1);
+ else /* Rotate Right */
+ offset = (int)((u_int)offset >> shift |
+ (u_int)offset << (32 - shift));
}
if (u == 0)
return base - offset;
Home |
Main Index |
Thread Index |
Old Index