public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH: PR target/41705] Enable if conversion for thumb1 by new   HAVE_conditional_execution definition
@ 2009-10-16 13:28 Carrot Wei
  2009-10-17  1:40 ` Ian Lance Taylor
  0 siblings, 1 reply; 10+ messages in thread
From: Carrot Wei @ 2009-10-16 13:28 UTC (permalink / raw)
  To: gcc-patches

This patch fixes
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41705

For target ARM HAVE_conditional_execution is enabled because it is supported
by ARM ISA. But when compiled to thumb1 instructions, conditional execution is
not supported, the enabled HAVE_conditional_execution will disable some if
conversion optimizations.

Change the macro definition to (!TARGET_THUMB1) so compiler can get the correct
value according to the target ISA.

Test:
This patch was applied to trunk GCC and tested on the arm emulator with newlib.
No new failure.


ChangeLog:
2009-10-16  Wei Guozhi  <carrot@google.com>

        PR target/41705
        * config/arm/arm.h : New definition for macro
        HAVE_conditional_execution.
        * ifcvt.c : Change the header files order.

thanks
Guozhi



Index: arm.h
===================================================================
--- arm.h       (revision 152888)
+++ arm.h       (working copy)
@@ -2753,4 +2753,10 @@ enum arm_builtins
 #define NEED_INDICATE_EXEC_STACK       0
 #endif

+/* TARGET_THUMB1 doesn't have conditional execution capability.  */
+#ifdef HAVE_conditional_execution
+#undef HAVE_conditional_execution
+#endif
+#define HAVE_conditional_execution (!TARGET_THUMB1)
+
 #endif /* ! GCC_ARM_H */


Index: ifcvt.c
===================================================================
--- ifcvt.c     (revision 152888)
+++ ifcvt.c     (working copy)
@@ -21,13 +21,13 @@
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "insn-config.h"
 #include "tm.h"

 #include "rtl.h"
 #include "regs.h"
 #include "function.h"
 #include "flags.h"
-#include "insn-config.h"
 #include "recog.h"
 #include "except.h"
 #include "hard-reg-set.h"

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-10-25 15:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-16 13:28 [PATCH: PR target/41705] Enable if conversion for thumb1 by new HAVE_conditional_execution definition Carrot Wei
2009-10-17  1:40 ` Ian Lance Taylor
2009-10-17  6:01   ` Carrot Wei
2009-10-17  6:01     ` Ian Lance Taylor
2009-10-17  6:18       ` Carrot Wei
2009-10-19 14:35       ` Carrot Wei
2009-10-22  5:29         ` Ian Lance Taylor
2009-10-23 17:11           ` Richard Earnshaw
2009-10-25 14:22             ` Carrot Wei
2009-10-25 15:55               ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).