summaryrefslogtreecommitdiff
path: root/lib/libc/arch/amd64/net/ntohs.S
blob: 3ee61fc5684af72cc0a79d04d08efadd515ff33f (plain)
1
2
3
4
5
6
7
8
9
10
11
/*	$OpenBSD: ntohs.S,v 1.2 2004/02/10 00:08:11 drahn Exp $	*/

/* Written by Artur Grabowski. Public Domain */

#include <machine/asm.h>

ENTRY(_C_LABEL(ntohs))
	movl    %edi,%eax
	xchgb   %ah,%al
	ret