blob: 30d696fcc237739beba520f1ce9146fab397b730 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef __ASM_METAG_SWAB_H
#define __ASM_METAG_SWAB_H
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm-generic/swab.h>
static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
{
return __builtin_metag_bswaps(x);
}
#define __arch_swab16 __arch_swab16
static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
return __builtin_metag_bswap(x);
}
#define __arch_swab32 __arch_swab32
static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
{
return __builtin_metag_bswapll(x);
}
#define __arch_swab64 __arch_swab64
#endif /* __ASM_METAG_SWAB_H */
|