syntax errors,wrong code
authorWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Tue, 18 Dec 1990 07:28:22 +0000 (23:28 -0800)
committerWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Tue, 18 Dec 1990 07:28:22 +0000 (23:28 -0800)
SCCS-vsn: lib/libc/i386/net/htons.s 5.2
SCCS-vsn: lib/libc/i386/net/ntohl.s 5.2
SCCS-vsn: lib/libc/i386/net/ntohs.s 5.2
SCCS-vsn: lib/libc/i386/net/htonl.s 5.3

usr/src/lib/libc/i386/net/htonl.s
usr/src/lib/libc/i386/net/htons.s
usr/src/lib/libc/i386/net/ntohl.s
usr/src/lib/libc/i386/net/ntohs.s

index 24e3dfc..5f19097 100644 (file)
@@ -9,16 +9,16 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-       .asciz "@(#)htonl.s     5.2 (Berkeley) %G%"
+       .asciz "@(#)htonl.s     5.3 (Berkeley) %G%"
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
-/* hostorder = ntohl(netorder) */
+/* netorder = htonl(hostorder) */
 
 #include "DEFS.h"
 
 
 #include "DEFS.h"
 
-ENTRY(ntohl)
-       mov     %eax,4(sp)
-       xchg    %al,%ah
-       rol     $16,%eax
-       xchg    %al,%ah
+ENTRY(htonl)
+       movl    4(%esp),%eax
+       xchgb   %al,%ah
+       roll    $16,%eax
+       xchgb   %al,%ah
        ret
        ret
index b833f4b..cff8afd 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-       .asciz "@(#)htons.s     5.1 (Berkeley) %G%"
+       .asciz "@(#)htons.s     5.2 (Berkeley) %G%"
 #endif /* LIBC_SCCS and not lint */
 
 /* netorder = htons(hostorder) */
 #endif /* LIBC_SCCS and not lint */
 
 /* netorder = htons(hostorder) */
@@ -17,6 +17,6 @@
 #include "DEFS.h"
 
 ENTRY(htons)
 #include "DEFS.h"
 
 ENTRY(htons)
-       movzwl  4(sp),%eax
-       xchg    %al,%ah
+       movzwl  4(%esp),%eax
+       xchgb   %al,%ah
        ret
        ret
index 774a236..a79e595 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-       .asciz "@(#)ntohl.s     5.1 (Berkeley) %G%"
+       .asciz "@(#)ntohl.s     5.2 (Berkeley) %G%"
 #endif /* LIBC_SCCS and not lint */
 
 /* hostorder = ntohl(netorder) */
 #endif /* LIBC_SCCS and not lint */
 
 /* hostorder = ntohl(netorder) */
@@ -17,8 +17,8 @@
 #include "DEFS.h"
 
 ENTRY(ntohl)
 #include "DEFS.h"
 
 ENTRY(ntohl)
-       mov     %eax,4(sp)
-       xchg    %al,%ah
-       rol     $16,%eax
-       xchg    %al,%ah
+       movl    4(%esp),%eax
+       xchgb   %al,%ah
+       roll    $16,%eax
+       xchgb   %al,%ah
        ret
        ret
index 6982d01..45cb4b0 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-       .asciz "@(#)ntohs.s     5.1 (Berkeley) %G%"
+       .asciz "@(#)ntohs.s     5.2 (Berkeley) %G%"
 #endif /* LIBC_SCCS and not lint */
 
 /* hostorder = ntohs(netorder) */
 #endif /* LIBC_SCCS and not lint */
 
 /* hostorder = ntohs(netorder) */
@@ -17,6 +17,6 @@
 #include "DEFS.h"
 
 ENTRY(ntohs)
 #include "DEFS.h"
 
 ENTRY(ntohs)
-       movzwl  4(sp),%eax
-       xchg    %al,%ah
+       movzwl  4(%esp),%eax
+       xchgb   %al,%ah
        ret
        ret