User account creation filtered due to spam.

Bug 48417 - -ffixed-regs option can't work in mips-elf-gcj compiler
Summary: -ffixed-regs option can't work in mips-elf-gcj compiler
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.4.2
: P3 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-02 19:54 UTC by licheng.1212@gmail.com
Modified: 2016-09-30 22:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description licheng.1212@gmail.com 2011-04-02 19:54:48 UTC
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!!
Comment 1 Richard Biener 2011-04-03 11:06:31 UTC
You have to build the java runtime with -ffixed-reg also.
Comment 2 licheng.1212@gmail.com 2011-04-03 15:43:45 UTC
(In reply to comment #1)
> You have to build the java runtime with -ffixed-reg also.
The runtime and all my project also have those options

export CFLAGS="-G0 -Wall -mabi=32 -msoft-float -mno-abicalls -march=xcpu -mtune=xcpu -Wa,-march=xcpu,-mtune=xcpu -mips16 -EL -mexplicit-relocs -falign-functions=16 -falign-jumps=16 -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 -ffunction-sections -fdata-sections -O0 -g"

export GCJFLAGS=${CFLAGS}
Comment 3 licheng.1212@gmail.com 2011-04-27 16:03:56 UTC
GCJ      	  java_main.java
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 --with-bugurl='In case of bug, please contact Coolsand Technologies.'
Thread model: single
gcc version 4.4.2 (Coolsand Version 1 - In test.) (GCC) 
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-C' '-v' '-fencoding=UTF-8' '-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g' '-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function' '-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16' '-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections' '-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6' '-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6' '-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL' '-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile' '-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static' '-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16' '-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar' '-fsyntax-only' '-femit-class-files' '-S' '-o' 'NONE'
 /home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/mips-elf/4.4.2/ecj1 src/java_main.java -Wno-deprecated -Wshadow -Wunused-function -Wunused -Wunused-variable -Wuninitialized -Wall -g -fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar -fencoding=UTF-8 -g -fsource=1.5 -ftarget=1.5 -fzip-dependency /tmp/cc7MD3YG.zip
src/java_main.java:2: warning: The import java.io.IOException is never used
	import java.io.IOException;
	       ^^^^^^^^^^^^^^^^^^^
src/java_main.java:15: warning: The field java_main.tmp is never read locally
	private MainMIDlet tmp;
	                   ^^^
2 problems (2 warnings)
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-C' '-v' '-fencoding=UTF-8' '-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g' '-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function' '-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16' '-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections' '-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6' '-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6' '-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL' '-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile' '-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static' '-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16' '-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar' '-fsyntax-only' '-femit-class-files' '-S' '-o' 'NONE'
COMPILER_PATH=/home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/mips-elf/4.4.2/:/home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/../../../../mips-elf/bin/
LIBRARY_PATH=/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/../../../../mips-elf/lib/
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-C' '-v' '-fencoding=UTF-8' '-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g' '-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function' '-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16' '-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections' '-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6' '-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6' '-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL' '-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile' '-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static' '-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16' '-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar' '-fsyntax-only' '-femit-class-files' '-S' '-o' 'NONE'
Using built-in specs.
Reading specs from /home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/../../../../mips-elf/lib/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
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 --with-bugurl='In case of bug, please contact Coolsand Technologies.'
Thread model: single
gcc version 4.4.2 (Coolsand Version 1 - In test.) (GCC) 
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-MD' '-MP' '-MF' '/home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/deps/debug/java_main.d' '-v' '-fencoding=UTF-8' '-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g' '-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function' '-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16' '-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections' '-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6' '-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6' '-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL' '-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile' '-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static' '-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16' '-o' '/home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/obj/debug/java_main.o' '-c' '-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar'
 /home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/mips-elf/4.4.2/ecj1 src/java_main.java -Wno-deprecated -Wshadow -Wunused-function -Wunused -Wunused-variable -Wuninitialized -Wall -g -fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar -fencoding=UTF-8 -g -fsource=1.5 -ftarget=1.5 -fzip-dependency /tmp/ccBuf66U.zip -fzip-target /tmp/ccO8jghr.jar
src/java_main.java:2: warning: The import java.io.IOException is never used
	import java.io.IOException;
	       ^^^^^^^^^^^^^^^^^^^
src/java_main.java:15: warning: The field java_main.tmp is never read locally
	private MainMIDlet tmp;
	                   ^^^
2 problems (2 warnings)
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-MD' '-MP' '-MF' '/home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/deps/debug/java_main.d' '-v' '-fencoding=UTF-8' '-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g' '-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function' '-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16' '-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections' '-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6' '-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6' '-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL' '-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile' '-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static' '-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16' '-o' '/home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/obj/debug/java_main.o' '-c' '-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar'
 /home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/mips-elf/4.4.2/jc1 /tmp/ccO8jghr.jar -fsource-filename=src/java_main.java -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -G0 -mel -quiet -dumpbase java_main.java -msoft-float -minterlink-mips16 -march=xcpu -mtune=xcpu -mexplicit-relocs -mmemcpy -mmips-tfile -mips16 -auxbase-strip /home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/obj/debug/java_main.o -g -O2 -Wno-deprecated -Wshadow -Wunused-function -Wunused -Wunused-variable -Wuninitialized -Wall -version -fsaw-java-file -fencoding=UTF-8 -freduced-reflection -falign-functions=16 -falign-jumps=16 -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-builtin-iswspace -ffixed-t3 -ffixed-t4 -ffixed-t5 -ffixed-t6 -ffixed-t7 -ffixed-s2 -ffixed-s3 -ffixed-s4 -ffixed-s5 -ffixed-s6 -ffixed-s7 -ffixed-fp -fweb -frename-registers -fwide-exec-charset=UTF-16LE -fshort-wchar -fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar -faux-classpath /tmp/ccBuf66U.zip -MD_ -MF /home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/deps/debug/java_main.d -o - |
 /home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/../../../../mips-elf/bin/as -v -G0 -EL -mips16 -O2 -g -no-mdebug -mabi=32 -march=xcpu -mtune=xcpu -v -march=xcpu -mtune=xcpu -o /home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/obj/debug/java_main.o
GNU assembler version 2.20 (mips-elf) using BFD version (GNU Binutils) 2.20 (Coolsand Tech v.4)
jc1: warning: command line option "-fno-builtin-iswspace" is valid for C/C++/ObjC/ObjC++ but not for Java
jc1: warning: command line option "-fwide-exec-charset=UTF-16LE" is valid for C/C++/ObjC/ObjC++ but not for Java
jc1: warning: command line option "-fshort-wchar" is valid for C/C++/ObjC/ObjC++ but not for Java
GNU Java (GCC) version 4.4.2 (Coolsand Version 1 - In test.) (mips-elf)
	compiled by GNU C version 4.5.1 20100924 (Red Hat 4.5.1-4), GMP version 4.3.2, MPFR version 2.4.2.
warning: GMP header version 4.3.2 differs from library version 4.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Class path starts here:
    /tmp/ccBuf66U.zip/ (zip)
    /home/lee/projects/g800_qq/soft/env/include/libj2me.jar/ (system) (zip)
    /home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar/ (system) (zip)
    /home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar/ (system) (zip)
    /home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar/ (system) (zip)
    /home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar/ (system) (zip)
    /home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/ (system)
    /home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar/ (system) (zip)
COMPILER_PATH=/home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/mips-elf/4.4.2/:/home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/../../../../mips-elf/bin/
LIBRARY_PATH=/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/mips-elf/4.4.2/../../../../mips-elf/lib/
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-MD' '-MP' '-MF' '/home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/deps/debug/java_main.d' '-v' '-fencoding=UTF-8' '-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g' '-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function' '-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16' '-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections' '-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6' '-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6' '-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL' '-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile' '-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static' '-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16' '-o' '/home/lee/projects/g800_qq/soft/build/gallite_s01_n98/application/adaptation/java/obj/debug/java_main.o' '-c' '-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar'


this is my compiler process,and it still use s4 ~s8
how about it!!

Disassembly of section .text._ZN9java_main4mainEJvv:

00000000 <_ZN9java_main4mainEJvv>:
   0:	63f2      	addiu	sp,-112

00000002 <$LCFI4>:
   2:	679e      	move	a0,s8
   4:	d41a      	sw	a0,104(sp)
   6:	6777      	move	v1,s7
   8:	6756      	move	v0,s6
   a:	67f5      	move	a3,s5
   c:	67d4      	move	a2,s4
   e:	6792      	move	a0,s2
  10:	d319      	sw	v1,100(sp)
  12:	d218      	sw	v0,96(sp)
  14:	b33c      	lw	v1,104 <$LCFI4+0x102>
  16:	b23d      	lw	v0,108 <$LCFI4+0x106>
  18:	d717      	sw	a3,92(sp)
  1a:	d616      	sw	a2,88(sp)
  1c:	d414      	sw	a0,80(sp)
  1e:	060c      	addiu	a2,sp,48
  20:	d012      	sw	s0,72(sp)
  22:	67fd      	move	a3,sp
  24:	67b3      	move	a1,s3
  26:	0404      	addiu	a0,sp,16
  28:	f0a0 0817 	la	s0,df <$LCFI4+0xdd>
  2c:	d30a      	sw	v1,40(sp)
  2e:	d20b      	sw	v0,44(sp)
  30:	621b      	sw	ra,108(sp)
  32:	d515      	sw	a1,84(sp)
  34:	d40c      	sw	a0,48(sp)
  36:	d113      	sw	s1,76(sp)
  38:	de01      	sw	s0,4(a2)
  3a:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  3e:	dee2      	sw	a3,8(a2)
  40:	6d01      	li	a1,1
  42:	ecab      	neg	a0,a1
  44:	d405      	sw	a0,20(sp)
  46:	b432      	lw	a0,10c <$LCFI4+0x10a>
  48:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  4c:	6500      	nop
  4e:	b431      	lw	a0,110 <$LCFI4+0x10e>
  50:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  54:	6500      	nop
  56:	b330      	lw	v1,114 <$LCFI4+0x112>
  58:	9b80      	lw	a0,0(v1)
  5a:	b230      	lw	v0,118 <$LCFI4+0x116>
  5c:	9aa2      	lw	a1,8(v0)
  5e:	2448      	beqz	a0,f0 <$LCFI4+0xee>
  60:	6b01      	li	v1,1
  62:	ea6b      	neg	v0,v1
  64:	d205      	sw	v0,20(sp)
  66:	9ce0      	lw	a3,0(a0)
  68:	9fde      	lw	a2,120(a3)
  6a:	ee40      	jalr	a2
  6c:	6801      	li	s0,1
  6e:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  72:	d005      	sw	s0,20(sp)
  74:	6d01      	li	a1,1
  76:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  7a:	d505      	sw	a1,20(sp)
  7c:	b427      	lw	a0,118 <$LCFI4+0x116>
  7e:	9ca3      	lw	a1,12(a0)
  80:	222a      	beqz	v0,d6 <$LCFI4+0xd4>
  82:	6e01      	li	a2,1
  84:	d605      	sw	a2,20(sp)
  86:	9a60      	lw	v1,0(v0)
  88:	9b6b      	lw	v1,44(v1)
  8a:	eb40      	jalr	v1
  8c:	6782      	move	a0,v0
  8e:	2af2      	bnez	v0,74 <$LCFI4+0x72>
  90:	b121      	lw	s1,114 <$LCFI4+0x112>
  92:	6e01      	li	a2,1
  94:	9980      	lw	a0,0(s1)
  96:	eacb      	neg	v0,a2
  98:	d205      	sw	v0,20(sp)
  9a:	b020      	lw	s0,118 <$LCFI4+0x116>
  9c:	98a4      	lw	a1,16(s0)
  9e:	2428      	beqz	a0,f0 <$LCFI4+0xee>
  a0:	d205      	sw	v0,20(sp)
  a2:	9c40      	lw	v0,0(a0)
  a4:	9afe      	lw	a3,120(v0)
  a6:	ef40      	jalr	a3
  a8:	6500      	nop
  aa:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  ae:	0404      	addiu	a0,sp,16
  b0:	911a      	lw	s1,104(sp)
  b2:	9018      	lw	s0,96(sp)
  b4:	9619      	lw	a2,100(sp)
  b6:	9517      	lw	a1,92(sp)
  b8:	9316      	lw	v1,88(sp)
  ba:	9215      	lw	v0,84(sp)
  bc:	9414      	lw	a0,80(sp)
  be:	971b      	lw	a3,108(sp)
  c0:	65d9      	move	s8,s1
  c2:	65d0      	move	s6,s0
  c4:	9113      	lw	s1,76(sp)
  c6:	9012      	lw	s0,72(sp)
  c8:	65f6      	move	s7,a2
  ca:	65b5      	move	s5,a1
  cc:	6593      	move	s4,v1
  ce:	6572      	move	s3,v0
  d0:	6554      	move	s2,a0
  d2:	ef00      	jr	a3
  d4:	630e      	addiu	sp,112
  d6:	6801      	li	s0,1
  d8:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  dc:	d005      	sw	s0,20(sp)
  de:	9107      	lw	s1,28(sp)
  e0:	9406      	lw	a0,24(sp)
  e2:	7101      	cmpi	s1,1
  e4:	6008      	bteqz	f6 <$LCFI4+0xf4>
  e6:	6a01      	li	v0,1
  e8:	ef4b      	neg	a3,v0
  ea:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  ee:	d705      	sw	a3,20(sp)
  f0:	1800 0000 	jal	0 <_ZN9java_main4mainEJvv>
  f4:	6500      	nop
  f6:	6d01      	li	a1,1
  f8:	ebab      	neg	v1,a1
  fa:	d305      	sw	v1,20(sp)
  fc:	f7ff 9c5c 	lw	v0,-4(a0)
 100:	17c7      	b	90 <$LCFI4+0x8e>
 102:	6500      	nop
	...
 11c:	6500      	nop
 11e:	6500      	nop
Comment 4 licheng.1212@gmail.com 2011-05-17 15:33:45 UTC
still hava this problem,please see the latest commit
Comment 5 Mikael Pettersson 2011-05-17 17:02:38 UTC
(In reply to comment #4)
> still hava this problem,please see the latest commit

See PR43700, which I suspect was fixed by r172616 on trunk.
Comment 6 licheng.1212@gmail.com 2011-08-27 06:12:05 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > still hava this problem,please see the latest commit
> 
> See PR43700, which I suspect was fixed by r172616 on trunk.

PR43700's patch is bad,But PR43732's patch is OK

PR43700:
--- branches/gcc-4_4-branch/gcc/config/mips/mips.c	2011/05/29 17:51:03	174408
+++ branches/gcc-4_4-branch/gcc/config/mips/mips.c	2011/05/29 18:10:44	174409
@@ -8495,7 +8495,7 @@
      property here.  */
   return (regno == GLOBAL_POINTER_REGNUM
 	  ? TARGET_CALL_SAVED_GP
-	  : !call_really_used_regs[regno]);
+	  : !global_regs[regno] && !call_really_used_regs[regno]);
 }
 
 /* Return true if the function body might clobber register REGNO.

PR43732:

diff -Naur gcc-4.4.3.base/gcc/config/mips/mips.c
gcc-4.4.3/gcc/config/mips/mips.c
--- gcc-4.4.3.base/gcc/config/mips/mips.c       2010-04-09 14:10:00.235609702
-0400
+++ gcc-4.4.3/gcc/config/mips/mips.c    2010-04-09 14:12:28.520998582 -0400
@@ -8495,7 +8495,7 @@
      property here.  */
   return (regno == GLOBAL_POINTER_REGNUM
          ? TARGET_CALL_SAVED_GP
-         : !call_really_used_regs[regno]);
+         : !call_really_used_regs[regno] && !fixed_regs[regno]);
 }

 /* Return true if the function body might clobber register REGNO.

Please check it!!
Comment 7 Mikael Pettersson 2011-08-28 10:25:41 UTC
I guess !global_regs[regno] vs !fixed_regs[regno] matters for compilation units that are compiled with -ffixed-$N but where there is no global register variable declaration for $N in scope.  Can you construct a C test case which shows that gcc clobbers a register $N even though the file is compiled with -ffixed-$N ?
Comment 8 Andrew Pinski 2016-09-30 22:51:36 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.