linux-mips
[Top] [All Lists]

Re: 64 bit compile problems

To: David Kesselring <dkesselr@mmc.atmel.com>
Subject: Re: 64 bit compile problems
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Fri, 5 Sep 2003 18:44:40 +0200 (MET DST)
Cc: linux-mips@linux-mips.org
In-reply-to: <Pine.GSO.4.44.0309050955460.26490-100000@ares.mmc.atmel.com>
Organization: Technical University of Gdansk
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 5 Sep 2003, David Kesselring wrote:

> I'm trying to build u-boot bootloader for a 5kc core in 64 bit mode. I'm
> having problems with the compiler/linker. If anyone has any ideas, please
> let me know.
> 
> When I use the toolchain that installs in
> "/usr/cygnus/mips3264-020217/H-i686-pc-linux-gnulibc2.1/bin", I get a link
> problem where all opcodes are not aligned on a 64 bit boundry. I get an
> extra 32bit word of 0x0 between two 64bit opcodes in the binary file.
> The cpp options I use are:-mips64 -EL -mlong64 -mcpu=r5k

 I don't really understand -- MIPS regular opcodes (i.e. not in the MIPS16
mode) have to be aligned to 32-bit boundaries.  What do you mean by
"64-bit opcodes"?  If there is a null word (a "nop") between each pair of
emitted opcodes, then the resulting binary should still work, although
suboptimally.  It may be a bug in gcc or gas.  Does the output from gcc
contains the padding?  What are the versions of gcc and binutils? 

> When I use a toolchain which I think I ftp'd from linux-mips.org
> (mips64el-linux), I get the following error. The cpp options I use
> are:-EL -mabi=64 -mips4 -mlong64
> 
> 
> /usr/bin/mips64el-linux-gcc  -O   -D__KERNEL__ -DTEXT_BASE=0x00000
> -I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include
> -I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include/asm -fno-builtin
> -ffreestanding -nostdinc -isystem
> /usr/lib/gcc-lib/mips64el-linux/2.95.4/include -pipe  -DCONFIG_MIPS
> -D__MIPS__ -EL -mabi=64 -mips4
> -mlong64 -Wall -Wstrict-prototypes -c -o atmel352.o atmel352.c
> atmel352.c: In function `sdram_timing_init':
> atmel352.c:82: warning: cast to pointer from integer of different size
> atmel352.c:90: warning: cast to pointer from integer of different size
> atmel352.c: In function `copydwords':
> atmel352.c:186: Internal compiler error in `rtx_equal_for_memref_p', at
> alias.c:682
> Please submit a full bug report.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> cpp0: output pipe has been closed

 That's interesting -- it's almost surely a bug in the RTL.  I may try to
reproduce it with my toolchain -- can you send me a preprocessed version
of this file?  If so, please run the following command and send me the
resulting atmel352.i file -- use `bzip2 -9' or `gzip -9' and send it
attached directly to me only to save net resources:

$ /usr/bin/mips64el-linux-gcc  -O   -D__KERNEL__ -DTEXT_BASE=0x00000
-I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include
-I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include/asm -fno-builtin
-ffreestanding -nostdinc -isystem
/usr/lib/gcc-lib/mips64el-linux/2.95.4/include -pipe  -DCONFIG_MIPS
-D__MIPS__ -EL -mabi=64 -mips4
-mlong64 -Wall -Wstrict-prototypes -E -o atmel352.i atmel352.c

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>