This is the mail archive of the 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: Patch for regression PR target/28490 (IA64 ICE)

> It isn't OK to remove the assert.  We will be using the wrong memory
> address if we ignore addend.  The +8 gets lost.

OK, I see this now.  I was looking at the first use of cl_symbols
instead of the second one and it is with the second one that the +8 gets

> .sdata
> .LC0:
>         data8   cl_symbols#+8
> .text
>         addl r15 = @gprel(.LC0), gp
>         ;;
>         ld8 r35 = [r15]
> Comparing to gcc-3.4, we get
>         addl r35 = @ltoff(cl_symbols#), r1
>         ;;
>         ld8 r35 = [r35]
>         ;;
>         adds r35 = 8, r35
> So the new code is probably better, even though it uses more sdata
> space, because there are fewer insns and fewer stops.

I was talking to someone locally and he wondered why we didn't generate:

	addl r35 = @ltoff(cl_symbols#+8), r1
	ld8 r35 = [r35]

He wasn't completly sure that the HP and GNU linkers would handle this,
but theoretically they should.  I think this is equivalent to what your
change creates, but with this setup the linker creates a fixup location
containing 'cl_symbols#+8' instead of having the compiler explicitly
create it.

> If we want the old code for some reason, all we have to do is pass the
> addend through to ia64_expand_load_address.  We can do this by either
> adding the addend back onto the symbol, or by passing the addend as an
> extra argument and rewriting ia64_expand_load_address a little.

I was looking at how to keep the addend attached to the symbol but I am
confused by the code in ia64_expand_move.  It seems like, if addend_lo
is zero, we ignore addend_hi.  Is it not possible for addend_lo to be
zero and addend_hi to be non-zero?  If so do we do the right thing?  I
don't understand how.

> I'm working on site for a customer tomorrow, and leaving for the Moscow
> Gelato GCC meeting on Friday, so it may be over a week before I see any
> replies. 
> -- 
> Jim Wilson, GNU Tools Support,

OK, have fun in Moscow.

Steve Ellcey

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