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
*/
#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) */
-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
*/
#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) */
#include "DEFS.h"
ENTRY(htons)
#include "DEFS.h"
ENTRY(htons)
- movzwl 4(sp),%eax
- xchg %al,%ah
+ movzwl 4(%esp),%eax
+ xchgb %al,%ah
*/
#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) */
#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
*/
#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) */
#include "DEFS.h"
ENTRY(ntohs)
#include "DEFS.h"
ENTRY(ntohs)
- movzwl 4(sp),%eax
- xchg %al,%ah
+ movzwl 4(%esp),%eax
+ xchgb %al,%ah