cpu.h: add __packed
authorAlan Cox <alan@linux.intel.com>
Thu, 29 Mar 2018 14:56:34 +0000 (15:56 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 29 Mar 2018 14:56:34 +0000 (15:56 +0100)
Kernel/cpu-6502/cpu.h
Kernel/cpu-65c816/cpu.h
Kernel/cpu-68000/cpu.h
Kernel/cpu-6809/cpu.h
Kernel/cpu-68hc11/cpu.h
Kernel/cpu-8086/cpu.h
Kernel/cpu-msp430x/cpu.h
Kernel/cpu-z80/cpu.h

index aa10486..5aa5f38 100644 (file)
@@ -69,3 +69,5 @@ typedef union {            /* this structure is endian dependent */
 /* CC65 is bright enough to partly optimise this but not fully so do it
    by hand */
 #define HIBYTE32(x)    (((uint8_t *)&(x))[3])
+
+#define __packed
index c370fb3..2a3c4a3 100644 (file)
@@ -76,3 +76,5 @@ typedef union {            /* this structure is endian dependent */
 
 /* cc65 really wants structs used repeatedly to be marked register */
 #define regptr register
+
+#define __packed
index ef06b66..9934608 100644 (file)
@@ -77,3 +77,5 @@ register struct u_data *udata_ptr asm ("a5");
 #define CONFIG_STACKSIZE       1024
 
 #define CPUTYPE        CPUTYPE_68000
+
+#define __packed               __attribute__((packed))
index c9a0285..0ba8e11 100644 (file)
@@ -71,3 +71,4 @@ typedef union {            /* this structure is endian dependent */
 #define BIG_ENDIAN
 
 #define CPUTYPE        CPUTYPE_6809
+#define __packed               __attribute__((packed))
index 47f022d..6faac2b 100644 (file)
@@ -68,3 +68,5 @@ typedef union {            /* this structure is endian dependent */
 #define BIG_ENDIAN
 
 #define CPUTYPE        CPUTYPE_68HC11
+
+#define __packed               __attribute__((packed))
index df32872..ce2ae6c 100644 (file)
@@ -94,3 +94,4 @@ static inline uint8_t inb(uint16_t port)
 }
 
 #define CPUTYPE        CPUTYPE_8086
+#define __packed               __attribute__((packed))
index e6aae65..03037c3 100644 (file)
@@ -119,3 +119,4 @@ typedef union {            /* this structure is endian dependent */
 #define no_cache_udata()
 
 #define CPUTYPE        CPUTYPE_MSP340X
+#define __packed               __attribute__((packed))
index cb5583c..3c8de8e 100644 (file)
@@ -87,3 +87,8 @@ typedef union {            /* this structure is endian dependent */
 
 /* Deal with SDCC code gen issue */
 #define HIBYTE32(x)    (((uint8_t *)&(x))[3])
+
+/* SDCC does not support attribute(packed) but then it also doesn't insert
+   padding either */
+
+#define __packed
\ No newline at end of file