summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-13 22:16:07 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-13 22:16:07 +0000
commit06b71e623934a2c8ab93c90cbc3d61bfc392aaf8 (patch)
tree56ca2f426c3384c9f4634a50b05c4fde4a44505e /gcc
parente17cf2c868cffd155cdc64936ec737cfc8339e01 (diff)
downloadgcc-06b71e623934a2c8ab93c90cbc3d61bfc392aaf8.tar.gz
* config/sh/sh.c (sh_override_options): When flag_exceptions or
flag_unwind_tables is on, turn flag_reorder_blocks_and_partition off. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh.c23
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 70905a8fe1b..77c52bf8afb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-13 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * config/sh/sh.c (sh_override_options): When flag_exceptions or
+ flag_unwind_tables is on, turn flag_reorder_blocks_and_partition
+ off.
+
2009-08-13 Ghassan Shobaki <ghassan.shobaki@amd.com>
* tree-ssa-loop-prefetch.c
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index b092c0e8a3c..a4be11cb979 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -874,6 +874,29 @@ sh_override_options (void)
flag_schedule_insns = 0;
}
+ /* Unwinding with -freorder-blocks-and-partition does not work on this
+ architecture, because it requires far jumps to label crossing between
+ hot/cold sections which are rejected on this architecture. */
+ if (flag_reorder_blocks_and_partition)
+ {
+ if (flag_exceptions)
+ {
+ inform (input_location,
+ "-freorder-blocks-and-partition does not work with "
+ "exceptions on this architecture");
+ flag_reorder_blocks_and_partition = 0;
+ flag_reorder_blocks = 1;
+ }
+ else if (flag_unwind_tables)
+ {
+ inform (input_location,
+ "-freorder-blocks-and-partition does not support unwind "
+ "info on this architecture");
+ flag_reorder_blocks_and_partition = 0;
+ flag_reorder_blocks = 1;
+ }
+ }
+
if (align_loops == 0)
align_loops = 1 << (TARGET_SH5 ? 3 : 2);
if (align_jumps == 0)