Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/acorn26/acorn26 The compiler doesn't know that setj...



details:   https://anonhg.NetBSD.org/src/rev/998e2bb618ff
branches:  trunk
changeset: 554823:998e2bb618ff
user:      he <he%NetBSD.org@localhost>
date:      Sun Nov 02 12:39:30 2003 +0000

description:
The compiler doesn't know that setjmp() always returns 0 "the first
time around", so move the initialization of cp0 and cp15 to outside
the if() statement to make this compile again.

diffstat:

 sys/arch/acorn26/acorn26/cpu.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 403ee814d2a5 -r 998e2bb618ff sys/arch/acorn26/acorn26/cpu.c
--- a/sys/arch/acorn26/acorn26/cpu.c    Sun Nov 02 12:01:40 2003 +0000
+++ b/sys/arch/acorn26/acorn26/cpu.c    Sun Nov 02 12:39:30 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.11 2003/10/11 03:01:53 christos Exp $ */
+/* $NetBSD: cpu.c,v 1.12 2003/11/02 12:39:30 he Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 Ben Harris
@@ -32,7 +32,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.11 2003/10/11 03:01:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.12 2003/11/02 12:39:30 he Exp $");
 
 #include <sys/device.h>
 #include <sys/proc.h>
@@ -152,9 +152,9 @@
        volatile register_t id;
        void *cp0, *cp15;
 
+       cp0 = install_coproc_handler(0, cpu_undef_handler);
+       cp15 = install_coproc_handler(15, cpu_undef_handler);
        if (setjmp(&undef_jmp) == 0) {
-               cp0 = install_coproc_handler(0, cpu_undef_handler);
-               cp15 = install_coproc_handler(15, cpu_undef_handler);
                id = CPU_ID_ARM2;
                /* ARM250 and ARM3 support SWP. */
                __asm __volatile ("swp r0, r0, [%0]" : : "r" (&dummy) : "r0");



Home | Main Index | Thread Index | Old Index