[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Fwd: [Mint-cvs] [FreeMiNT CVS] freemint/sys/usb/src.km/udd/storage



On 07/04/2014 10:27, David Gálvez wrote:
Index: freemint/sys/usb/src.km/udd/storage/xhdi.h
diff -u freemint/sys/usb/src.km/udd/storage/xhdi.h:1.1.6.1
freemint/sys/usb/src.km/udd/storage/xhdi.h:1.1.6.2
--- freemint/sys/usb/src.km/udd/storage/xhdi.h:1.1.6.1  Mon Mar 24 19:26:43 2014
+++ freemint/sys/usb/src.km/udd/storage/xhdi.h  Mon Apr  7 03:47:27 2014
...
@@ -66,11 +66,12 @@
         long    psize[MAX_LOGICAL_DRIVE];
         short   flags[MAX_LOGICAL_DRIVE];               /* B15:swap,
B7:change, B0:bootable */
         BPB     bpb[MAX_LOGICAL_DRIVE];
-       uchar   dev_num[MAX_LOGICAL_DRIVE];
-
  } __attribute__((packed));
  typedef struct pun_info PUN_INFO;

Beware, __attribute__((packed)) is evil on 68000!
It causes all access to the short and long variables to use multiple move.b and bit shifts, just in case the address is not even. This causes a big slowdown.

This attribute should be removed. And it must be double checked that the structure size don't change.

--
Vincent Rivière