Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libkern/arch/sh5 Fix a sign-extension botch for ILP32.



details:   https://anonhg.NetBSD.org/src/rev/e7bc4d9ec595
branches:  trunk
changeset: 538400:e7bc4d9ec595
user:      scw <scw%NetBSD.org@localhost>
date:      Sat Oct 19 08:54:23 2002 +0000

description:
Fix a sign-extension botch for ILP32.

diffstat:

 sys/lib/libkern/arch/sh5/scanc.S |  7 +++----
 sys/lib/libkern/arch/sh5/skpc.S  |  9 ++++-----
 2 files changed, 7 insertions(+), 9 deletions(-)

diffs (50 lines):

diff -r 5f2a7deba666 -r e7bc4d9ec595 sys/lib/libkern/arch/sh5/scanc.S
--- a/sys/lib/libkern/arch/sh5/scanc.S  Sat Oct 19 08:53:45 2002 +0000
+++ b/sys/lib/libkern/arch/sh5/scanc.S  Sat Oct 19 08:54:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scanc.S,v 1.1 2002/10/17 11:53:33 scw Exp $    */
+/*     $NetBSD: scanc.S,v 1.2 2002/10/19 08:54:23 scw Exp $    */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -42,12 +42,11 @@
  */
 ENTRY(scanc)
 #ifndef _LP64
+       addz.l  r2, r63, r2
        add.l   r3, r63, r3
        add.l   r4, r63, r4
-       addz.l  r2, r3, r2              /* r2 = &cp[size] */
-#else
+#endif
        add     r2, r3, r2              /* r2 = &cp[size] */
-#endif
        pta/l   1f, tr1
        pta/u   2f, tr2
        ptabs/u r18, tr0
diff -r 5f2a7deba666 -r e7bc4d9ec595 sys/lib/libkern/arch/sh5/skpc.S
--- a/sys/lib/libkern/arch/sh5/skpc.S   Sat Oct 19 08:53:45 2002 +0000
+++ b/sys/lib/libkern/arch/sh5/skpc.S   Sat Oct 19 08:54:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: skpc.S,v 1.1 2002/10/17 11:53:33 scw Exp $     */
+/*     $NetBSD: skpc.S,v 1.2 2002/10/19 08:55:00 scw Exp $     */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -43,13 +43,12 @@
  * XXX: Room for some optimising here, specifically to use quad loads.
  */
 ENTRY(skpc)
-       andi    r2, 0xff, r2
 #ifndef _LP64
        add.l   r4, r63, r4
-       addz.l  r3, r4, r3              /* r3 = &cp[size] */
-#else
+       addz.l  r3, r63, r3
+#endif
+       andi    r2, 0xff, r2
        add     r3, r4, r3              /* r3 = &cp[size] */
-#endif
        pta/l   1f, tr1
        pta/u   2f, tr2
        ptabs/u r18, tr0



Home | Main Index | Thread Index | Old Index