From 5ac78ccb345fe9222e758fc2d91eb687e584d2fa Mon Sep 17 00:00:00 2001 From: jtc Date: Wed, 16 Mar 1994 17:34:14 +0000 Subject: [PATCH] [hn]to[nh][sl] functions used xchgb %h1,%b1 instead of the faster (on the i486 & i586) rorw $8, %w1. --- lib/libc/arch/i386/net/htonl.S | 8 ++++---- lib/libc/arch/i386/net/htons.S | 6 +++--- lib/libc/arch/i386/net/ntohl.S | 8 ++++---- lib/libc/arch/i386/net/ntohs.S | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/libc/arch/i386/net/htonl.S b/lib/libc/arch/i386/net/htonl.S index f9378c0ddb79..219cdbcbef27 100644 --- a/lib/libc/arch/i386/net/htonl.S +++ b/lib/libc/arch/i386/net/htonl.S @@ -34,19 +34,19 @@ * SUCH DAMAGE. * * from: @(#)htonl.s 5.3 (Berkeley) 12/17/90 - * $Id: htonl.S,v 1.3 1994/03/12 01:52:12 jtc Exp $ + * $Id: htonl.S,v 1.4 1994/03/16 17:34:14 jtc Exp $ */ #include #if defined(LIBC_SCCS) -RCSID("$Id: htonl.S,v 1.3 1994/03/12 01:52:12 jtc Exp $") +RCSID("$Id: htonl.S,v 1.4 1994/03/16 17:34:14 jtc Exp $") #endif /* netorder = htonl(hostorder) */ ENTRY(htonl) movl 4(%esp),%eax - xchgb %al,%ah + rorw $8,%ax roll $16,%eax - xchgb %al,%ah + rorw $8,%ax ret diff --git a/lib/libc/arch/i386/net/htons.S b/lib/libc/arch/i386/net/htons.S index 4c6bb616ed88..4b3a7a0b54e0 100644 --- a/lib/libc/arch/i386/net/htons.S +++ b/lib/libc/arch/i386/net/htons.S @@ -34,17 +34,17 @@ * SUCH DAMAGE. * * from: @(#)htons.s 5.2 (Berkeley) 12/17/90 - * $Id: htons.S,v 1.3 1994/03/12 01:52:14 jtc Exp $ + * $Id: htons.S,v 1.4 1994/03/16 17:34:15 jtc Exp $ */ #include #if defined(LIBC_SCCS) -RCSID("$Id: htons.S,v 1.3 1994/03/12 01:52:14 jtc Exp $") +RCSID("$Id: htons.S,v 1.4 1994/03/16 17:34:15 jtc Exp $") #endif /* netorder = htons(hostorder) */ ENTRY(htons) movzwl 4(%esp),%eax - xchgb %al,%ah + rorw $8,%ax ret diff --git a/lib/libc/arch/i386/net/ntohl.S b/lib/libc/arch/i386/net/ntohl.S index 95011a4fefc0..38db2114eb03 100644 --- a/lib/libc/arch/i386/net/ntohl.S +++ b/lib/libc/arch/i386/net/ntohl.S @@ -34,19 +34,19 @@ * SUCH DAMAGE. * * from: @(#)ntohl.s 5.2 (Berkeley) 12/17/90 - * $Id: ntohl.S,v 1.3 1994/03/12 01:52:15 jtc Exp $ + * $Id: ntohl.S,v 1.4 1994/03/16 17:34:16 jtc Exp $ */ #include #if defined(LIBC_SCCS) -RCSID("$Id: ntohl.S,v 1.3 1994/03/12 01:52:15 jtc Exp $") +RCSID("$Id: ntohl.S,v 1.4 1994/03/16 17:34:16 jtc Exp $") #endif /* hostorder = ntohl(netorder) */ ENTRY(ntohl) movl 4(%esp),%eax - xchgb %al,%ah + rorw $8,%ax roll $16,%eax - xchgb %al,%ah + rorw $8,%ax ret diff --git a/lib/libc/arch/i386/net/ntohs.S b/lib/libc/arch/i386/net/ntohs.S index 1453c4088cbf..e549465b1c88 100644 --- a/lib/libc/arch/i386/net/ntohs.S +++ b/lib/libc/arch/i386/net/ntohs.S @@ -34,17 +34,17 @@ * SUCH DAMAGE. * * from: @(#)ntohs.s 5.2 (Berkeley) 12/17/90 - * $Id: ntohs.S,v 1.3 1994/03/12 01:52:16 jtc Exp $ + * $Id: ntohs.S,v 1.4 1994/03/16 17:34:17 jtc Exp $ */ #include #if defined(LIBC_SCCS) -RCSID("$Id: ntohs.S,v 1.3 1994/03/12 01:52:16 jtc Exp $") +RCSID("$Id: ntohs.S,v 1.4 1994/03/16 17:34:17 jtc Exp $") #endif /* hostorder = ntohs(netorder) */ ENTRY(ntohs) movzwl 4(%esp),%eax - xchgb %al,%ah + rorw $8,%ax ret