Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc Remove shifts of the PSR constants befo...



details:   https://anonhg.NetBSD.org/src/rev/ce76c0ed820f
branches:  trunk
changeset: 341883:ce76c0ed820f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Nov 27 13:45:17 2015 +0000

description:
Remove shifts of the PSR constants before applying to the trap frame.
Oring 0 doesn't do anything useful.

diffstat:

 sys/arch/sparc/sparc/emul.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r c2f2c964ed88 -r ce76c0ed820f sys/arch/sparc/sparc/emul.c
--- a/sys/arch/sparc/sparc/emul.c       Fri Nov 27 09:45:03 2015 +0000
+++ b/sys/arch/sparc/sparc/emul.c       Fri Nov 27 13:45:17 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emul.c,v 1.17 2012/05/01 09:40:15 martin Exp $ */
+/*     $NetBSD: emul.c,v 1.18 2015/11/27 13:45:17 joerg Exp $  */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.17 2012/05/01 09:40:15 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.18 2015/11/27 13:45:17 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -190,17 +190,17 @@
                tf->tf_psr &= ~PSR_ICC;
 
                if (*rd == 0)
-                       tf->tf_psr |= PSR_Z << 20;
+                       tf->tf_psr |= PSR_Z;
                else {
                        if (op.bits.sgn && *rd < 0)
-                               tf->tf_psr |= PSR_N << 20;
+                               tf->tf_psr |= PSR_N;
                        if (op.bits.div) {
                                if (*rd * *rs2 != *rs1)
-                                       tf->tf_psr |= PSR_O << 20;
+                                       tf->tf_psr |= PSR_O;
                        }
                        else {
                                if (*rd / *rs2 != *rs1)
-                                       tf->tf_psr |= PSR_O << 20;
+                                       tf->tf_psr |= PSR_O;
                        }
                }
        }



Home | Main Index | Thread Index | Old Index