Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/lib/libkern/arch/sh3 Pullup revision 1.2 (approved ...



details:   https://anonhg.NetBSD.org/src/rev/90804d594f40
branches:  netbsd-1-5
changeset: 489056:90804d594f40
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Aug 11 17:03:47 2000 +0000

description:
Pullup revision 1.2 (approved by thorpej):

        support big endian, too.

diffstat:

 sys/lib/libkern/arch/sh3/byte_swap_4.S |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r 01397d60d6c2 -r 90804d594f40 sys/lib/libkern/arch/sh3/byte_swap_4.S
--- a/sys/lib/libkern/arch/sh3/byte_swap_4.S    Fri Aug 11 17:03:02 2000 +0000
+++ b/sys/lib/libkern/arch/sh3/byte_swap_4.S    Fri Aug 11 17:03:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: byte_swap_4.S,v 1.1 1999/09/13 10:31:37 itojun Exp $   */
+/*     $NetBSD: byte_swap_4.S,v 1.1.12.1 2000/08/11 17:03:47 msaitoh Exp $     */
 
 /*-
  * Copyright (C) 1999 SHIMIZU Ryo.  All rights reserved.
@@ -27,11 +27,20 @@
  */
 
 #include <machine/asm.h>
+#include <machine/endian.h>
 
 ENTRY(bswap32)
+#if BYTE_ORDER == LITTLE_ENDIAN
 ALTENTRY(ntohl)
 ALTENTRY(htonl)
+#endif
        swap.b  r4,r0   
        swap.w  r0,r0
        rts
        swap.b  r0,r0
+#if BYTE_ORDER == BIG_ENDIAN
+ALTENTRY(ntohl)
+ALTENTRY(htonl)
+#endif
+       rts
+       mov     r4, r0



Home | Main Index | Thread Index | Old Index