Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/fpu Make the "cond" variable an unsigned va...



details:   https://anonhg.NetBSD.org/src/rev/1ad2e77d120c
branches:  trunk
changeset: 565119:1ad2e77d120c
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Mar 30 00:04:37 2004 +0000

description:
Make the "cond" variable an unsigned variable.  Stops sign extension
problems when we shift it left and right while creating the new value
for the condition register.

Fixes problems reported by Juergen Hannken-Illjes in toolchain/24938.

diffstat:

 sys/arch/powerpc/fpu/fpu_emu.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 20b892d92def -r 1ad2e77d120c sys/arch/powerpc/fpu/fpu_emu.c
--- a/sys/arch/powerpc/fpu/fpu_emu.c    Mon Mar 29 23:28:11 2004 +0000
+++ b/sys/arch/powerpc/fpu/fpu_emu.c    Tue Mar 30 00:04:37 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_emu.c,v 1.10 2003/10/27 04:30:32 simonb Exp $ */
+/*     $NetBSD: fpu_emu.c,v 1.11 2004/03/30 00:04:37 simonb Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.10 2003/10/27 04:30:32 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.11 2004/03/30 00:04:37 simonb Exp $");
 
 #include "opt_ddb.h"
 
@@ -273,7 +273,8 @@
        union instr instr = *insn;
        int *a;
        vaddr_t addr;
-       int ra, rb, rc, rt, type, mask, fsr, cx, bf, setcr, cond;
+       int ra, rb, rc, rt, type, mask, fsr, cx, bf, setcr;
+       unsigned int cond;
        struct fpreg *fs;
 
        /* Setup work. */



Home | Main Index | Thread Index | Old Index