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.5 (approved ...



details:   https://anonhg.NetBSD.org/src/rev/f05c67f036b3
branches:  netbsd-1-5
changeset: 489054:f05c67f036b3
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Aug 11 17:01:34 2000 +0000

description:
Pullup revision 1.5 (approved by thorpej):

        support big endian, too.

diffstat:

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

diffs (30 lines):

diff -r e360f12747c8 -r f05c67f036b3 sys/lib/libkern/arch/sh3/byte_swap_2.S
--- a/sys/lib/libkern/arch/sh3/byte_swap_2.S    Fri Aug 11 12:11:51 2000 +0000
+++ b/sys/lib/libkern/arch/sh3/byte_swap_2.S    Fri Aug 11 17:01:34 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: byte_swap_2.S,v 1.1 1999/09/13 10:31:37 itojun Exp $   */
+/*     $NetBSD: byte_swap_2.S,v 1.1.12.1 2000/08/11 17:01:34 msaitoh Exp $     */
 
 /*-
  * Copyright (C) 1999 SHIMIZU Ryo.  All rights reserved.
@@ -27,10 +27,18 @@
  */
 
 #include <machine/asm.h>
+#include <machine/endian.h>
 
 ENTRY(bswap16)
+#if BYTE_ORDER == LITTLE_ENDIAN
 ALTENTRY(ntohs)
 ALTENTRY(htons)
+#endif
        rts
-       swap.b  r4,r0
-
+       swap.b  r4, r0
+#if BYTE_ORDER == BIG_ENDIAN
+ALTENTRY(ntohs)
+ALTENTRY(htons)
+#endif
+       rts
+       mov     r4, r0



Home | Main Index | Thread Index | Old Index