xref: /csrg-svn/lib/libc/sparc/net/ntohs.s (revision 61168)
154395Storek/*
2*61168Sbostic * Copyright (c) 1992, 1993
3*61168Sbostic *	The Regents of the University of California.  All rights reserved.
454395Storek *
554395Storek * This software was developed by the Computer Systems Engineering group
654395Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
754395Storek * contributed to Berkeley.
854395Storek *
954395Storek * %sccs.include.redist.c%
1054395Storek *
1154395Storek * from: $Header: ntohs.s,v 1.1 92/06/25 12:47:07 torek Exp $
1254395Storek */
1354395Storek
1454395Storek#if defined(LIBC_SCCS) && !defined(lint)
15*61168Sbostic	.asciz "@(#)ntohs.s	8.1 (Berkeley) 06/04/93"
1654395Storek#endif /* LIBC_SCCS and not lint */
1754395Storek
1854395Storek/* hostorder = ntohs(netorder) */
1954395Storek
2054395Storek#include "DEFS.h"
2154395Storek
2254395StorekENTRY(ntohs)
2354395Storek	sethi	%hi(0xffff0000), %o1
2454395Storek	retl
2554395Storek	 andn	%o0, %o1, %o0
26