libjava build failure sol2.6 asm problem?
Jeff Sturm
jsturm@one-point.com
Wed Dec 19 22:32:00 GMT 2001
On Wed, 19 Dec 2001, Richard Henderson wrote:
> On Wed, Dec 19, 2001 at 02:46:29PM -0500, Jeff Sturm wrote:
> > /* shit */
> > + LABEL_PRESERVE_P (XEXP (operands[1], 0)) = 1;
> > emit_insn (gen_movsi_pic_label_ref (operands[0], operands[1]));
> > DONE;
>
> This shouldn't be done with labels at all. And in fact, I can't
> see where load_pic_register would use such a thing; it's probably
> garbage.
OK, I'm confused. This has nothing to do with load_pic_register,
which is always emitted in the prologue; it's doing a movsi with a
LABEL_REF operand (in the context of an EH cleanup).
Without PIC, we're emitting:
sethi %hi(.LL38), %o0
or %o0, %lo(.LL38), %i0
so we can later branch back to .LL38:
jmp %i0
Fine so far. With PIC this becomes:
sethi %hi(_GLOBAL_OFFSET_TABLE_-(.LL39-.)), %o0
or %o0, %lo(_GLOBAL_OFFSET_TABLE_-(.LL39-.)), %o0
...
sub %l7, %o0, %i0
jmp %i0
(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?
Jeff
More information about the Gcc
mailing list