This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Crossjumping of tables
- From: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- To: roger at www dot eyesopen dot com (Roger Sayle)
- Cc: zlomekj at suse dot cz (Josef Zlomek), weigand at immd1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Mar 2003 15:59:22 +0100 (MET)
- Subject: 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