xref: /csrg-svn/lib/libc/vax/net/htons.s (revision 21442)
1*21442Sdist/*
2*21442Sdist * Copyright (c) 1983 Regents of the University of California.
3*21442Sdist * All rights reserved.  The Berkeley software License Agreement
4*21442Sdist * specifies the terms and conditions for redistribution.
5*21442Sdist */
6*21442Sdist
7*21442Sdist#ifndef lint
8*21442Sdiststatic char sccsid[] = "@(#)htons.s	5.1 (Berkeley) 05/30/85";
9*21442Sdist#endif not lint
10*21442Sdist
119714Ssam/* hostorder = htons(netorder) */
129714Ssam
139714Ssam#include "DEFS.h"
149714Ssam
159714SsamENTRY(htons)
169714Ssam	rotl	$8,4(ap),r0
179714Ssam	movb	5(ap),r0
189714Ssam	movzwl	r0,r0
199714Ssam	ret
20