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][ARM] Add support for ADDW and SUBW instructions


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;" ?


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