This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libjava build failure sol2.6 asm problem?


On Wed, 19 Dec 2001, Richard Henderson wrote:
> On Wed, Dec 19, 2001 at 11:48:38PM -0500, Jeff Sturm wrote:
> > (In the latter case the label is somehow deleted, thus the bug report.)
> > Now what part of this is garbage?  What should movsi do differently for
> > PIC?
> 
> Hmm.  I didn't remember that we tried to load labels that way.

We didn't.  Something changed recently in the way we emit cleanups.

For input like:

abstract class Test {
  abstract void innertest();
  synchronized void test() {
    innertest();
  }
}

last month's build generated the call to _Jv_MonitorExit twice:

        b,a     .LL3
.LL4:
        call    _Jv_MonitorExit, 0
        mov     %l0, %o0
        call    _Unwind_Resume, 0
        mov     %i0, %o0
.LL3:
        call    _Jv_MonitorExit, 0
        mov     %l0, %o0
        ret
        restore

branching  to .LL4 when unwinding the stack and to .LL3 during a normal
return.

Recent builds try to be more clever, emitting only one call to
_Jv_MonitorExit by loading the return or resume label into %i0:

        sethi   %hi(.LL7), %o0
        or      %o0, %lo(.LL7), %i0
.LL2:
        call    _Jv_MonitorExit, 0
        mov     %l0, %o0
        jmp     %i0
         nop
.LL7:
        b,a     .LL1
.LL8:
        mov     %i0, %o0
        mov     %o0, %i1
        sethi   %hi(.LL6), %o0
        b       .LL2
        or      %o0, %lo(.LL6), %i0
.LL6:
        call    _Unwind_Resume, 0
        mov     %i1, %o0
.LL1:
        ret
        restore

But this code is uglier (especially with PIC), bigger and triggers the
sparc bug in movsi_pic_label_ref.   It seems like a regression to me.
(Any idea what patch would have introduced it, before I attempt a binary
search?)

> What was the test case?

Bootstrapping sparc w/ java.  (Specifically, compiling
java/lang/ThreadGroup.java with -O2 -fPIC.)

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]