More on addressof: how to fix the backends that use them?

Steven Bosscher stevenb@suse.de
Tue Jun 1 21:37:00 GMT 2004


Hi,

Before we can even consider removing addresof, there still
are two backends that build ADDRESSOF rtxes: alpha and ia64.

For example, alpha.c uses it as follows:

/* Return or create a pseudo containing the gp value for the current
   function.  Needed only if TARGET_LD_BUGGY_LDGP.  */

rtx
alpha_gp_save_rtx (void)
{
  rtx r = get_hard_reg_initial_val (DImode, 29);
  if (GET_CODE (r) != MEM)
    r = gen_mem_addressof (r, NULL_TREE, /*rescan=*/true);
  return r;
}

What can this code be replaced with such that it does not
create an ADDRESSOF?

I've attached an updated version of Honza's patch from some time
ago (http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01417.html) for
those who are interested.

Gr.
Steven

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_addressof.diff
Type: text/x-diff
Size: 28081 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20040601/88f446a2/attachment.bin>


More information about the Gcc mailing list