Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ALLSPICE.BERKELEY.EDU!rab From: rab@ALLSPICE.BERKELEY.EDU (Robert A. Bruce) Newsgroups: gnu.gcc.bug Subject: Bug cross-compiling for 68k on little-endian Message-ID: <9001052341.AA933689@sprite.Berkeley.EDU> Date: 5 Jan 90 23:41:49 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Lines: 37 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