#include <asm_defs.h>
FUNCTION(__swap_int16):
movl %edi, %eax
bswap %eax
shr $16, %eax
ret
FUNCTION_END(__swap_int16)
FUNCTION(__swap_int32):
movl %edi, %eax
bswap %eax
ret
FUNCTION_END(__swap_int32)
FUNCTION(__swap_int64):
movq %rdi, %rax
bswap %rax
ret
FUNCTION_END(__swap_int64)
FUNCTION(__swap_float):
sub $8, %rsp
movss %xmm0, (%rsp)
movl (%rsp), %eax
bswap %eax
movl %eax, (%rsp)
movss (%rsp), %xmm0
add $8, %rsp
ret
FUNCTION_END(__swap_float)
FUNCTION(__swap_double):
sub $8, %rsp
movsd %xmm0, (%rsp)
movq (%rsp), %rax
bswap %rax
movq %rax, (%rsp)
movsd (%rsp), %xmm0
add $8, %rsp
ret
FUNCTION_END(__swap_double)