summaryrefslogtreecommitdiff
path: root/lib/libc/arch/x86_64/net/htons.S
blob: 80d9f9374a8c0a6c498a9493692d6a1e588da4e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
/*	$OpenBSD: htons.S,v 1.1 2004/01/28 01:44:45 mickey Exp $	*/

/* Written by Artur Grabowski. Public Domain */

#include <machine/asm.h>

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