1/* $NetBSD: byte_swap_2.S,v 1.1 2005/12/20 19:28:51 christos Exp $ */ 2 3#include <machine/asm.h> 4 5#if defined(LIBC_SCCS) 6 RCSID("$NetBSD: byte_swap_2.S,v 1.1 2005/12/20 19:28:51 christos Exp $") 7#endif 8 9_ENTRY(_C_LABEL(__bswap16)) 10_ENTRY(_C_LABEL(ntohs)) 11_ENTRY(_C_LABEL(htons)) 12_PROF_PROLOGUE 13 movl %edi,%eax 14 xchgb %ah,%al 15 ret 16