View | Details | Raw Unified | Return to bug 236920
Collapse All | Expand All

(-)sys/arm64/include/endian.h (-8 / +5 lines)
Lines 60-72 Link Here
60
#define	__htons(x)        (__bswap16(x))
60
#define	__htons(x)        (__bswap16(x))
61
61
62
static __inline __uint64_t
62
static __inline __uint64_t
63
__bswap64(__uint64_t x)
63
__bswap64(__uint64_t v)
64
{
64
{
65
	__uint64_t ret;
65
	__uint64_t ret;
66
66
67
	__asm __volatile("rev %0, %1\n"
67
	__asm("rev %0, %1\n" : "=r" (ret) : "r" (v));
68
			 : "=&r" (ret), "+r" (x));
68
69
	
70
	return (ret);
69
	return (ret);
71
}
70
}
72
71
Lines 75-82 Link Here
75
{
74
{
76
	__uint32_t ret;
75
	__uint32_t ret;
77
76
78
	__asm __volatile("rev32 %x0, %x1\n"
77
	__asm("rev32 %x0, %x1\n" : "=r" (ret) : "r" (v));
79
			 : "=&r" (ret), "+r" (v));
80
	
78
	
81
	return (ret);
79
	return (ret);
82
}
80
}
Lines 86-93 Link Here
86
{
84
{
87
	__uint32_t ret;
85
	__uint32_t ret;
88
86
89
	__asm __volatile("rev16 %w0, %w1\n"
87
	__asm("rev16 %w0, %w1\n" : "=r" (ret) : "r" (v));
90
			 : "=&r" (ret), "+r" (v));
91
88
92
	return ((__uint16_t)ret);
89
	return ((__uint16_t)ret);
93
}		
90
}		

Return to bug 236920