File tree 1 file changed +1
-21
lines changed
1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change 7
7
8
8
#include <stdint.h>
9
9
#include <string.h>
10
+ #include "utils.h"
10
11
11
12
#ifndef __BYTE_ORDER__
12
13
#include <sys/param.h>
@@ -30,15 +31,6 @@ typedef uint32_t u32, __le32;
30
31
typedef uint8_t u8 ;
31
32
typedef int64_t s64 ;
32
33
#endif
33
- #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
34
- #define le64_to_cpup (a ) __builtin_bswap64(*(a))
35
- #define le32_to_cpup (a ) __builtin_bswap32(*(a))
36
- #define cpu_to_le64 (a ) __builtin_bswap64(a)
37
- #else
38
- #define le64_to_cpup (a ) (*(a))
39
- #define le32_to_cpup (a ) (*(a))
40
- #define cpu_to_le64 (a ) (a)
41
- #endif
42
34
#ifndef __unused
43
35
#define __unused __attribute__((unused))
44
36
#endif
@@ -55,18 +47,6 @@ typedef int64_t s64;
55
47
#define __force
56
48
#endif
57
49
58
- static __always_inline __unused __le32 get_unaligned_le32 (const u8 * a )
59
- {
60
- __le32 l ;
61
- __builtin_memcpy (& l , a , sizeof (l ));
62
- return le32_to_cpup (& l );
63
- }
64
- static __always_inline __unused __le64 get_unaligned_le64 (const u8 * a )
65
- {
66
- __le64 l ;
67
- __builtin_memcpy (& l , a , sizeof (l ));
68
- return le64_to_cpup (& l );
69
- }
70
50
static __always_inline __unused void put_unaligned_le64 (u64 s , u8 * d )
71
51
{
72
52
__le64 l = cpu_to_le64 (s );
You can’t perform that action at this time.
0 commit comments