[Bug java/48417] New: -ffixed-regs option can't work in mips-elf-gcj compiler
licheng.1212 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Apr 2 19:54:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48417
Summary: -ffixed-regs option can't work in mips-elf-gcj
compiler
Product: gcc
Version: 4.4.2
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: java
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: licheng.1212@gmail.com
I hava build a cross compiler for my embeded platform
Using built-in specs.
Target: mips-elf
Configured with: ../gcc-4.4.2/configure --prefix=/home/lee/gnu_src/dist
--target=mips-elf --with-newlib
--with-headers=../newlib-1.18.0/newlib/libc/include/
--with-ar=/home/lee/gnu_src/dist/bin/mips-elf-ar
--with-as=/home/lee/gnu_src/dist/bin/mips-elf-as
--with-ld=/home/lee/gnu_src/dist/bin/mips-elf-ld
--with-mpfr=/home/lee/gnu_src/dist --with-gmp=/home/lee/gnu_src/dist
--with-ppl=/home/lee/gnu_src/dist --with-cloog=/home/lee/gnu_src/dist
--enable-languages=c,c++,java --disable-multilib --enable-libgcj
--disable-threads --disable-interpreter --disable-libgcj-bc
--enable-reduced-reflection --with-system-zlib
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--enable-static --disable-getenv-properties --disable-libunwind-exceptions
--enable-sjlj-exceptions --disable-java-awt --disable-dssi --disable-bootstrap
--disable-plugin --disable-shared --without-x --enable-java-gc=boehm
--without-libffi --disable-jvmpi --disable-tls --disable-java-net
--with-gcc-version-trigger=../gcc-4.4.2/gcc/version.c --disable-libstdcxx-pch
and I add the following option for compiler
-G0 -Wall -msoft-float -march=xcpu -mtune=xcpu -Wa,-march=xcpu,-mtune=xcpu
-mips16 -EL -mexplicit-relocs -fweb -frename-registers -mmemcpy -mmips-tfile
-nostartfiles -nostdlib -nodefaultlibs -c -pipe -ffixed-t3 -ffixed-t4
-ffixed-t5 -ffixed-t6 -ffixed-t7 -ffixed-s2 -ffixed-s3 -ffixed-s4 -ffixed-s5
-ffixed-s6 -ffixed-s7 -ffixed-fp -minterlink-mips16
as it shows, i make some -fixed-regs options for my compiler,and it work OK for
C code, but the java code is still use register s2 ~ fp,I don't konw why?
following is some code fragment disassemble from the final elf file
82056f50 <_ZN9java_main4mainEJvv>:
82056f50: 63f2 addiu sp,-112
82056f52 <$LCFI4>:
82056f52: 679e move a0,s8
82056f54: d41a sw a0,104(sp)
82056f56: 6777 move v1,s7
82056f58: 6756 move v0,s6
82056f5a: 67f5 move a3,s5
82056f5c: 67d4 move a2,s4
82056f5e: 6792 move a0,s2
82056f60: d319 sw v1,100(sp)
82056f62: d218 sw v0,96(sp)
82056f64: b33c lw v1,82057054 <$LCFI4+0x102>
82056f66: b23d lw v0,82057058 <$LCFI4+0x106>
82056f68: d717 sw a3,92(sp)
82056f6a: d616 sw a2,88(sp)
82056f6c: d414 sw a0,80(sp)
82056f6e: 060c addiu a2,sp,48
82056f70: d012 sw s0,72(sp)
82056f72: 67fd move a3,sp
82056f74: 67b3 move a1,s3
how about of the -ffixed-reg option for gcj?
thanks!!
More information about the Gcc-bugs
mailing list