This is the mail archive of the gcc-patches@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: [PATCH, committed] SH: Fix PR58314 (unsatisfied constraints)


Hi Richard,

On 09/16/2013 07:10 PM, Richard Sandiford wrote:
> Hi Christian,
>
> Christian Bruel <christian.bruel@st.com> writes:
>> @@ -6893,11 +6894,14 @@ label:
>>  ;; reloading MAC subregs otherwise.  For that probably special patterns
>>  ;; would be required.
>>  (define_insn "*mov<mode>_reg_reg"
>> -  [(set (match_operand:QIHI 0 "arith_reg_dest" "=r")
>> -	(match_operand:QIHI 1 "register_operand" "r"))]
>> +  [(set (match_operand:QIHI 0 "arith_reg_dest" "=r,m,*z")
>> +	(match_operand:QIHI 1 "register_operand" "r,*z,m"))]
> If the constraints allow "m", the predicates need to accept memories too.
> (It'd be worth having an insn condition that rejects both operands
> being memories though.)
>
> Thanks,
> Richard
Thanks for your comment,

I was wondering this too when doing the fix. I felt that a memory
operand would be matched by the *movhi" patterns bellow.  As  I wanted
to fix only the spilling case, so the original operand is a pseudo reg
having matched the register predicate.
Without the predicate memory not found, I wonder how I never hit a kind
of "insn not found" error,  well, 'll give a try to adding a memory
condition in the predicate, but I fear that the movhi patterns will stop
to match,

Cheers

Christian



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