1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
5 #include <linux/types.h>
8 #if defined(__sparc__) && defined(__arch64__)
9 static inline __u16
__arch_swab16p(const __u16
*addr
)
13 __asm__
__volatile__ ("lduha [%2] %3, %0"
15 : "m" (*addr
), "r" (addr
), "i" (ASI_PL
));
18 #define __arch_swab16p __arch_swab16p
20 static inline __u32
__arch_swab32p(const __u32
*addr
)
24 __asm__
__volatile__ ("lduwa [%2] %3, %0"
26 : "m" (*addr
), "r" (addr
), "i" (ASI_PL
));
29 #define __arch_swab32p __arch_swab32p
31 static inline __u64
__arch_swab64p(const __u64
*addr
)
35 __asm__
__volatile__ ("ldxa [%2] %3, %0"
37 : "m" (*addr
), "r" (addr
), "i" (ASI_PL
));
40 #define __arch_swab64p __arch_swab64p
43 #define __SWAB_64_THRU_32__
44 #endif /* defined(__sparc__) && defined(__arch64__) */
46 #endif /* _SPARC_SWAB_H */