summaryrefslogtreecommitdiff
path: root/lib/libc/arch/x86_64/net/htons.S
blob: 62295abcd97b4c76f847a225010edf3cf8036933 (plain)
1
2
3
4
5
6
7
8
9
10
11
/*	$OpenBSD: htons.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(htons))
	movl    %edi,%eax
	xchgb   %ah,%al
	ret