Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Build 32bit constant with lis+ori, not lis+addi. Th...



details:   https://anonhg.NetBSD.org/src/rev/2c7513ee29d2
branches:  trunk
changeset: 331080:2c7513ee29d2
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jul 30 22:45:21 2014 +0000

description:
Build 32bit constant with lis+ori, not lis+addi. The instructions
differ on the sign extension handling of the immediate.

diffstat:

 sys/arch/evbppc/mpc85xx/mpc85xx_start.S |  6 +++---
 sys/arch/powerpc/powerpc/locore_subr.S  |  4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 9b680aec5c6c -r 2c7513ee29d2 sys/arch/evbppc/mpc85xx/mpc85xx_start.S
--- a/sys/arch/evbppc/mpc85xx/mpc85xx_start.S   Wed Jul 30 20:52:18 2014 +0000
+++ b/sys/arch/evbppc/mpc85xx/mpc85xx_start.S   Wed Jul 30 22:45:21 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpc85xx_start.S,v 1.6 2012/07/29 21:36:27 matt Exp $   */
+/*     $NetBSD: mpc85xx_start.S,v 1.7 2014/07/30 22:45:21 joerg Exp $  */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,7 +37,7 @@
 #include <sys/cdefs.h>
 #include <powerpc/asm.h>
 
-RCSID("$NetBSD: mpc85xx_start.S,v 1.6 2012/07/29 21:36:27 matt Exp $")
+RCSID("$NetBSD: mpc85xx_start.S,v 1.7 2014/07/30 22:45:21 joerg Exp $")
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -87,7 +87,7 @@
         * Set all the registers we don't care about to a known junk value.
         */
        lis     %r2,0xdeadbeef@ha
-       addi    %r2,%r2,0xdeadbeef@l
+       ori     %r2,%r2,0xdeadbeef@l
        mr      %r9,%r2
        mr      %r10,%r9
        mr      %r11,%r9
diff -r 9b680aec5c6c -r 2c7513ee29d2 sys/arch/powerpc/powerpc/locore_subr.S
--- a/sys/arch/powerpc/powerpc/locore_subr.S    Wed Jul 30 20:52:18 2014 +0000
+++ b/sys/arch/powerpc/powerpc/locore_subr.S    Wed Jul 30 22:45:21 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore_subr.S,v 1.51 2014/07/29 19:15:47 joerg Exp $   */
+/*     $NetBSD: locore_subr.S,v 1.52 2014/07/30 22:45:21 joerg Exp $   */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -509,7 +509,7 @@
        lwz     %r31, FRAME_SRR1(%r1)   /* trapexit wants srr1 in r31 */
 #ifdef PPC_BOOKE
        lis     %r30, 0xbeeffeed@ha
-       addi    %r30, %r30, 0xbeeffeed@l
+       ori     %r30, %r30, 0xbeeffeed@l
        andis.  %r0,%r31,PSL_CE@h
        tweqi   %r0,0
        andi.   %r0,%r31,PSL_DE@l



Home | Main Index | Thread Index | Old Index