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]

About EXTRA_ADDRESS_CONSTRAINT


Hello everybody,

I've defined a special constraint for my port describing members of structures 
because I need to access structure members via a special method of the target 
language (i.e. there are get/set instructions to access members). Therefore I 
needed such access to structure members to be reloaded when needed. As I 
can't work with addresses on my target, I wanted the *content* of the member 
to be reloaded, not the address (otherwise it would place the address into a 
register and generate a set to the address contained in that register, which 
I can't handle). So everything suggests me to mark my constraint with 
EXTRA_ADDRESS_CONSTRAINT.

However, the manual says "Any constraint marked as EXTRA_ADDRESS_CONSTRAINT 
can only be used with the address_operand predicate." I don't really 
understand why because (1) I use my constraint with plenty of predicates, and 
no address_operand and it does the job well, and (2) as constraints marked 
with it indicates that a reload should be done on what's pointed by the 
address, I can't think of a suitable usage with address_operand.

I'd like to know: is it safe to use a constraint marked with 
EXTRA_ADDRESS_CONSTRAINT with another predicate than address_operand? If not, 
is there another, safe way to do what I want? I've tried plenty of things 
with EXTRA_MEMORY_CONSTRAINT, but as it reloads addresses it doesn't seem to 
be for me.

Any comment or advice welcome,
Thanks,
Alex.


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