[PATCH][ARM] Add support for ADDW and SUBW instructions

Dmitry Plotnikov dplotnikov@ispras.ru
Mon Jun 6 14:26:00 GMT 2011


On 06/06/2011 05:33 PM, Andrew Stubbs wrote:
> On 06/06/11 14:26, Dmitry Plotnikov wrote:
>>         if (const_ok_for_arm (INTVAL (x))
>> -      || const_ok_for_arm (~INTVAL (x)))
>> +      || const_ok_for_arm (~INTVAL (x))
>> +      || (TARGET_THUMB2&&  outer == PLUS
>> + &&  (const_ok_for_op (INTVAL (x), outer))))
>
> Sorry, I should have noticed before ...
>
> This whole condition should be covered by a single call to 
> const_ok_for_op. It already calls const_ok_for_arm internally.
>
This condition is not covered by const_ok_for_op, because "outer" can be 
equal to other rtx codes, which are not covered in const_ok_for_op like 
IF_THEN_ELSE or MULT (I have several ICEs with these codes).  I don't 
know how to fix this correctly - should I add all codes to 
const_ok_for_op or maybe just replace default alternative from 
gcc_unreachable() to "return 0;" ?



More information about the Gcc-patches mailing list