This is the mail archive of the gcc@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: reload question about unmet constraints


On Tue, Sep 15, 2015 at 7:42 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> But the only difference between define_memory_constraint and a plain
> define_constraint is just that define_memory_constraint guarantees
> that any memory operand can be made valid by reloading the address
> into a base register ...
>
> If the set of operands accepted by a constraint does *not* have that
> property, it must not be defined via define_memory_constraint, and
> you should simply use define_constraint instead.

An invalid near mem can be converted to a valid near mem by reloading
its address into a base reg.  An invalid far mem can be converted to a
valid far mem by reloading its address into a base reg.  But one can't
convert a near mem to a far mem by reloading the address, nor can one
convert a far mem to a near mem by reloading its address.  So we need
another dimension to the validity testing here, besides the question
of whether the address can be reloaded, there is the question of
whether it is in the right address space.  Though I don't think the
rl78 is actually using address spaces, and it isn't clear if that
would help.

Jim


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