Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2003 19:44:50 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 29764 for review
Message-ID:  <200304260244.h3Q2iom2078046@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=29764

Change 29764 by peter@peter_daintree on 2003/04/25 19:44:22

	trivial implementations

Affected files ...

.. //depot/projects/hammer/lib/libc/x86_64/net/Makefile.inc#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/net/htonl.S#2 edit
.. //depot/projects/hammer/lib/libc/x86_64/net/htons.S#2 edit
.. //depot/projects/hammer/lib/libc/x86_64/net/ntohl.S#2 edit
.. //depot/projects/hammer/lib/libc/x86_64/net/ntohs.S#2 edit

Differences ...

==== //depot/projects/hammer/lib/libc/x86_64/net/Makefile.inc#3 (text+ko) ====

@@ -1,2 +1,4 @@
 #	@(#)Makefile.inc	8.1 (Berkeley) 6/4/93
 # $FreeBSD: src/lib/libc/i386/net/Makefile.inc,v 1.6 1999/08/27 23:59:24 peter Exp $
+
+SRCS+=	htonl.S htons.S ntohl.S ntohs.S

==== //depot/projects/hammer/lib/libc/x86_64/net/htonl.S#2 (text+ko) ====

@@ -45,8 +45,6 @@
         .weak CNAME(htonl)
         .set CNAME(htonl),CNAME(__htonl)
 ENTRY(__htonl)
-	movl	4(%esp),%eax
-	xchgb	%al,%ah
-	roll	$16,%eax
-	xchgb	%al,%ah
+	movl	%edi,%eax
+	bswap	%eax
 	ret

==== //depot/projects/hammer/lib/libc/x86_64/net/htons.S#2 (text+ko) ====

@@ -45,6 +45,6 @@
         .weak CNAME(htons)
         .set CNAME(htons),CNAME(__htons)
 ENTRY(__htons)
-	movzwl	4(%esp),%eax
+	movzwl	%edi,%eax
 	xchgb	%al,%ah
 	ret

==== //depot/projects/hammer/lib/libc/x86_64/net/ntohl.S#2 (text+ko) ====

@@ -45,8 +45,6 @@
         .weak CNAME(ntohl)
         .set CNAME(ntohl),CNAME(__ntohl)
 ENTRY(__ntohl)
-	movl	4(%esp),%eax
-	xchgb	%al,%ah
-	roll	$16,%eax
-	xchgb	%al,%ah
+	movl	%edi,%eax
+	bswap	%eax
 	ret

==== //depot/projects/hammer/lib/libc/x86_64/net/ntohs.S#2 (text+ko) ====

@@ -47,6 +47,6 @@
         .weak CNAME(ntohs)
         .set CNAME(ntohs),CNAME(__ntohs)
 ENTRY(__ntohs)
-	movzwl	4(%esp),%eax
+	movzwl	%edi,%eax
 	xchgb	%al,%ah
 	ret



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304260244.h3Q2iom2078046>