[gnu.gcc.bug] Bug cross-compiling for 68k on little-endian

rab@ALLSPICE.BERKELEY.EDU (Robert A. Bruce) (01/06/90)

gcc:        version 1.36
machine:    decStation 3100
os:         Sprite version 1.045
options:    -g -O -S

When cross compiling for a 68k on a little-endian machine
doubles are passed to procedures with the wrong end first.

Example program -------------------------------------------------------------


    main() { foo(1.0); }


Compiled on a ds3100 --------------------------------------------------------

_main:
	link a6,#0
	movel #1072693248,sp@-      <--- These two instructions
	clrl sp@-                   <---  are in the wrong order.
	jbsr _foo
	unlk a6
	rts

Compiled on a sun3 or sun4 --------------------------------------------------

_main:
	link a6,#0
	clrl sp@-
	movel #1072693248,sp@-
	jbsr _foo
	unlk a6
	rts

-----------------------------------------------------------------------

        -bob