68000: avoid __builtin_bswap32 for now
authorAlan Cox <alan@linux.intel.com>
Tue, 13 Sep 2016 10:53:26 +0000 (11:53 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 13 Sep 2016 10:53:26 +0000 (11:53 +0100)
Kernel/cpu-68000/cpu.h
Kernel/platform-v68/p68000.S

index 6e6791b..c8a9e83 100644 (file)
@@ -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
index 647eb19..10ac3c3 100644 (file)
@@ -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