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