RE: Simulator bootloader fails with gcc 4

Luck, Tony
2005-08-18T18:57:03Z

>Anyway, I looked quickly at the simulator code. I don't see anything
>wrong on that side. On SSC_COMPLETION, you end up doing a byte by byte
>memcpy for copyin for disk_stat and a byte by byte for copyout. Not much
>could go wrong there. The definition for disk_stat is identical (w/o the
>aligned attribute).

Ah ... but gcc has an unpleasant habit of inlining memcpy() calls. This
is really annoying when you have taken the trouble to replace code
does a structure copy with an explicit call to memcpy() becuase
you know that one of the source or destination is unaligned, only
to have gcc generate some inline ld8/st8 instructions.

-Tony