This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: extra machine-dependent passes
> Consider a target for which the pic register is set via a
> pc-relative computation. E.g. m68k where we use
>
> lea (%pc, _GLOBAL_OFFSET_TABLE_@GOTPC), %a5
>
> i.e. "a5 = pc+magic". Now, your bits only allow us to do a
> plain copy from a hard register into a pseudo. Which would
> force us to calculate the value into %a5 first. There's no
> reason we can't put this value into the pseudo to start with.
There's no reason why we can't support these, it just becomes more
complicated to keep track of what values we have available and which
pseudos we need to stitch together.
Perhaps a function that passes an rtl expression instead of a hard
regno? We could keep a list of rtx's instead of hard_regnos and use
rtx_equal_p() or something similar.