Re: define_memory_constraint and REG_OK_STRICT

2009-10-02 Thread Richard Henderson
On 10/02/2009 05:03 AM, Mohamed Shafi wrote: That particular case works, and yes arm does it that way but there are other targets that uses (reload_completed || reload_in_progress) like s390. So thats why i had to ask if my definition of strict is proper or not. I am not sure which one to use

Re: define_memory_constraint and REG_OK_STRICT

2009-10-02 Thread Mohamed Shafi
2009/9/30 Richard Henderson : > On 09/29/2009 09:46 PM, Mohamed Shafi wrote: >> >>  bool strict =  reload_completed ? true : false; > > What happens if you set "strict = false" here? > That's what ARM does. That particular case works, and yes arm does it that way but there are other targets that

Re: define_memory_constraint and REG_OK_STRICT

2009-09-30 Thread Richard Henderson
On 09/29/2009 09:46 PM, Mohamed Shafi wrote: bool strict = reload_completed ? true : false; What happens if you set "strict = false" here? That's what ARM does. r~

Re: define_memory_constraint and REG_OK_STRICT

2009-09-29 Thread Mohamed Shafi
2009/9/30 Richard Henderson : > On 09/29/2009 07:32 AM, Mohamed Shafi wrote: >> >> My question is my definition of strict correct? >> or should it be reload_in_progress || reload_completed? > > I'm tempted to say it should be the later, but I'm not sure it really makes > any difference since reload

Re: define_memory_constraint and REG_OK_STRICT

2009-09-29 Thread Richard Henderson
On 09/29/2009 07:32 AM, Mohamed Shafi wrote: My question is my definition of strict correct? or should it be reload_in_progress || reload_completed? I'm tempted to say it should be the later, but I'm not sure it really makes any difference since reload does not query the operand predicates; i

Re: define_memory_constraint and REG_OK_STRICT

2009-09-29 Thread Paolo Bonzini
My question is my definition of strict correct? or should it be reload_in_progress || reload_completed? This is not my area of expertise, but "reload_completed" is definitely too weak. I actually think strict should always be true when testing for satisfaction of constraints. Paolo

define_memory_constraint and REG_OK_STRICT

2009-09-29 Thread Mohamed Shafi
Hello all, I am doing a port for a 32bit target in GCC 4.4.0. I have defined memory_constraints in predicates.c like this (define_memory_constraint "Sr0" "Memory refrence through base registers" (match_test "target_mem_constraint (\"r0\", op)")) In the function target_mem_constraint i have