Commit 6dba1b67601685ff00ef5d08cc4f11db00cff598
1 parent
66b5bf4216
Exists in
master
and in
39 other branches
sh: Fix more user header breakage from sh64 integration.
posix_types.h and byteorder.h were sticking purely with the Kconfig symbols, which doesn't work when we scrub the headers for user use. Fixes a very unhelpful build error in current klibc. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Showing 2 changed files with 13 additions and 8 deletions Side-by-side Diff
include/asm-sh/byteorder.h
... | ... | @@ -11,13 +11,13 @@ |
11 | 11 | static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) |
12 | 12 | { |
13 | 13 | __asm__( |
14 | -#ifdef CONFIG_SUPERH32 | |
14 | +#ifdef __SH5__ | |
15 | + "byterev %0, %0\n\t" | |
16 | + "shari %0, 32, %0" | |
17 | +#else | |
15 | 18 | "swap.b %0, %0\n\t" |
16 | 19 | "swap.w %0, %0\n\t" |
17 | 20 | "swap.b %0, %0" |
18 | -#else | |
19 | - "byterev %0, %0\n\t" | |
20 | - "shari %0, 32, %0" | |
21 | 21 | #endif |
22 | 22 | : "=r" (x) |
23 | 23 | : "0" (x)); |
24 | 24 | |
... | ... | @@ -28,12 +28,11 @@ |
28 | 28 | static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) |
29 | 29 | { |
30 | 30 | __asm__( |
31 | -#ifdef CONFIG_SUPERH32 | |
32 | - "swap.b %0, %0" | |
33 | -#else | |
31 | +#ifdef __SH5__ | |
34 | 32 | "byterev %0, %0\n\t" |
35 | 33 | "shari %0, 32, %0" |
36 | - | |
34 | +#else | |
35 | + "swap.b %0, %0" | |
37 | 36 | #endif |
38 | 37 | : "=r" (x) |
39 | 38 | : "0" (x)); |