xref: /csrg-svn/lib/libc/vax/net/htons.s (revision 34814)
121442Sdist/*
221442Sdist * Copyright (c) 1983 Regents of the University of California.
3*34814Sbostic * All rights reserved.
4*34814Sbostic *
5*34814Sbostic * Redistribution and use in source and binary forms are permitted
6*34814Sbostic * provided that the above copyright notice and this paragraph are
7*34814Sbostic * duplicated in all such forms and that any documentation,
8*34814Sbostic * advertising materials, and other materials related to such
9*34814Sbostic * distribution and use acknowledge that the software was developed
10*34814Sbostic * by the University of California, Berkeley.  The name of the
11*34814Sbostic * University may not be used to endorse or promote products derived
12*34814Sbostic * from this software without specific prior written permission.
13*34814Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*34814Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*34814Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1621442Sdist */
1721442Sdist
18*34814Sbostic#if defined(LIBC_SCCS) && !defined(lint)
19*34814Sbostic	.asciz "@(#)htons.s	5.5 (Berkeley) 06/27/88"
20*34814Sbostic#endif /* LIBC_SCCS and not lint */
2121442Sdist
229714Ssam/* hostorder = htons(netorder) */
239714Ssam
249714Ssam#include "DEFS.h"
259714Ssam
2634425SmckusickENTRY(htons, 0)
279714Ssam	rotl	$8,4(ap),r0
289714Ssam	movb	5(ap),r0
299714Ssam	movzwl	r0,r0
309714Ssam	ret
31