From 9e986a6b69541983771333fc477b35e1895e0662 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 13 Sep 2016 00:13:19 +0100 Subject: [PATCH] 68000: use builtin swap functions --- Kernel/cpu-68000/cpu.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Kernel/cpu-68000/cpu.h b/Kernel/cpu-68000/cpu.h index fd074549..6e6791b3 100644 --- a/Kernel/cpu-68000/cpu.h +++ b/Kernel/cpu-68000/cpu.h @@ -55,11 +55,10 @@ extern uint16_t swab(uint16_t); #define ntohs(x) (x) #define ntohl(x) (x) -#define cpu_to_le16(x) swab(x) -#define le16_to_cpu(x) swab(x) -#define cpu_to_le32(x) ((((uint32_t)cpu_to_le16((x) & 0xFFFF)) << 16) | \ - (uint32_t)cpu_to_le16((x) >> 16)) -#define le32_to_cpu(x) cpu_to_le32(x) +#define cpu_to_le16(x) le16_to_cpu(x) +#define le16_to_cpu(x) (uint16_t)(__builtin_bswap16((uint16_t)(x))) +#define cpu_to_le32(x) le32_to_cpu(x) +#define le32_to_cpu(x) (uint32_t)(__builtin_bswap16((uint32_t)(x))) /* We don't need any banking bits really */ #define CODE1 @@ -83,3 +82,5 @@ register struct u_data *udata_ptr asm ("a5"); #define udata (*udata_ptr) #define BIG_ENDIAN + +#define CONFIG_STACKSIZE 1024 -- 2.34.1