This is the mail archive of the gcc-patches@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: Crossjumping of tables


Roger Sayle wrote:

> Have you considered targetm.delegitimize_address?  On s390 this
> should convert the second form back into the first, without having
> to understand the shape of the backend-specific UNSPEC rtl.  This
> is the function used by avoid_constant_pool_reference to extract
> values back out of the constant pool.

Note that this UNSPEC does have a particular semantics that needs
to be respected.  The value in the literal pool is not the address
represented by the label, but rather the *offset* from the start
of the literal pool to that address.

When replacing such constants, you really need to know what value
they represent (because there are sometimes multiple methods of
loading addresses from PIC code), it is not enough to say 'well,
this is something involving that label'.

delegimize_address is always careful to return something that
represent the same value, so it would leave this particular
UNSPEC as is in any case.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand at informatik dot uni-erlangen dot de


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