This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: MIPS Wrong-code regression.
- From: Richard Sandiford <richard at codesourcery dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: GCC <gcc at gcc dot gnu dot org>, Java GCJ Mailing List <java at gcc dot gnu dot org>
- Date: Wed, 31 Jan 2007 07:41:20 +0000
- Subject: Re: MIPS Wrong-code regression.
- References: <45C039F8.10803@avtrex.com>
David Daney <ddaney@avtrex.com> writes:
> Sometime between 1/7 and 1/16 on the trunk I started getting wrong code
> on a bunch of java testcases under mipsel-linux.
>
> It looks related to (but not necessarily caused by) this patch:
>
> http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01346.html
>
> For example if we examine the assembler output of the PR9577.java
> testcase, we see:
>
> .
> .
> .
> $LBB2:
> lw $2,40($fp)
> sw $2,24($fp)
> lw $2,24($fp)
> move $4,$2
> .option pic0
> jal _ZN4java4lang6ObjectC1Ev
> nop
>
> .option pic2
> lw $28,16($fp)
> $LBE2:
> move $sp,$fp
> lw $31,36($sp)
> lw $fp,32($sp)
> addiu $sp,$sp,40
> j $31
> nop
>
> The call to _ZN4java4lang6ObjectC1Ev is being generated as non-pic, even
> though that symbol is defined in libgcj.so. The assembler and linker
> conspire to jump to address 0x00000000 for this call.
>
> It looks like the logic that decides if a symbol is external to the
> compilation unit is faulty.
>
> Any ideas about where it might have gone wrong?
Not off-hand. I think -mno-shared is using the right interfaces to
test for locality.
> I will try to look into it more tomorrow.
Thanks, let me know how it goes. I won't have any time to do
out-of-hours gcc stuff today, but might tomorrow night.
Richard