From: Alan Cox Date: Tue, 13 Sep 2016 10:53:26 +0000 (+0100) Subject: 68000: avoid __builtin_bswap32 for now X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ae92c4e08c6b4c8aba7de114977a4c5df2df610f;p=FUZIX.git 68000: avoid __builtin_bswap32 for now --- diff --git a/Kernel/cpu-68000/cpu.h b/Kernel/cpu-68000/cpu.h index 6e6791b3..c8a9e83e 100644 --- a/Kernel/cpu-68000/cpu.h +++ b/Kernel/cpu-68000/cpu.h @@ -58,7 +58,8 @@ extern uint16_t swab(uint16_t); #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))) +/* This is broken on the Fedora m68k gcc 5.3.1 */ +//#define le32_to_cpu(x) (uint32_t)(__builtin_bswap32((uint32_t)(x))) /* We don't need any banking bits really */ #define CODE1 diff --git a/Kernel/platform-v68/p68000.S b/Kernel/platform-v68/p68000.S index 647eb191..10ac3c3a 100644 --- a/Kernel/platform-v68/p68000.S +++ b/Kernel/platform-v68/p68000.S @@ -11,6 +11,7 @@ .globl udata_block .globl devide_read_data .globl devide_write_data + .globl le32_to_cpu .mri 1 trap_reboot: @@ -134,6 +135,15 @@ devide_write_l: move.w (a0)+,$00F01000 dbra d0,devide_write_l rts +; +; Bits we need to deal with breakages in gcc +; +le32_to_cpu: + move.l 4(sp),d0 + ror.w #8,d0 + swap d0 + ror.w #8,d0 + rts .section data