summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1999-01-22 11:01:32 +0000
committermycroft <mycroft@NetBSD.org>1999-01-22 11:01:32 +0000
commitef50bbf452ac342a0e35bab4ac67cc0fb329e44f (patch)
tree64e22dd97054ad6a16ac0fbf03e26f21b43403b4 /sys/lib
parentda8a0f49c7c0a5903706b7a10c1c791798ef3e01 (diff)
Sync with libc.
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libkern/arch/alpha/byte_swap_2.S5
-rw-r--r--sys/lib/libkern/arch/alpha/byte_swap_4.S5
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/lib/libkern/arch/alpha/byte_swap_2.S b/sys/lib/libkern/arch/alpha/byte_swap_2.S
index 86ba3f8d749..06815003cae 100644
--- a/sys/lib/libkern/arch/alpha/byte_swap_2.S
+++ b/sys/lib/libkern/arch/alpha/byte_swap_2.S
@@ -1,4 +1,4 @@
-/* $NetBSD: byte_swap_2.S,v 1.3 1999/01/15 13:31:29 bouyer Exp $ */
+/* $NetBSD: byte_swap_2.S,v 1.4 1999/01/22 11:01:32 mycroft Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -37,9 +37,8 @@
LEAF(bswap16, 1) /* a0 contains 0x0123 */
XLEAF(htons, 1)
XLEAF(ntohs, 1)
- extbl a0, 0, t0 /* t0 = 0x 23 */
+ insbl a0, 1, t0 /* t0 = 0x23 */
extbl a0, 1, t1 /* t1 = 0x 01 */
- sll t0, 8, t0 /* t1 = 0x23 */
or t0, t1, v0 /* v0 = 0x2301 */
RET
END(bswap16)
diff --git a/sys/lib/libkern/arch/alpha/byte_swap_4.S b/sys/lib/libkern/arch/alpha/byte_swap_4.S
index a217c71ba5c..25b8672508b 100644
--- a/sys/lib/libkern/arch/alpha/byte_swap_4.S
+++ b/sys/lib/libkern/arch/alpha/byte_swap_4.S
@@ -1,4 +1,4 @@
-/* $NetBSD: byte_swap_4.S,v 1.4 1999/01/15 20:34:31 thorpej Exp $ */
+/* $NetBSD: byte_swap_4.S,v 1.5 1999/01/22 11:01:32 mycroft Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -37,11 +37,10 @@
LEAF(bswap32, 1) /* a0 contains 0x01234567 */
XLEAF(htonl, 1)
XLEAF(ntohl, 1)
- extbl a0, 0, t0 /* t0 = 0x 67 */
+ insbl a0, 3, t0 /* t0 = 0x67 */
extbl a0, 1, t1 /* t1 = 0x 45 */
extbl a0, 2, t2 /* t2 = 0x 23 */
extbl a0, 3, t3 /* t3 = 0x 01 */
- sll t0, 24, t0 /* t0 = 0x67 */
sll t1, 16, t1 /* t1 = 0x 45 */
sll t2, 8, t2 /* t2 = 0x 23 */
or t3, t0, v0 /* v0 = 0x67 01 */