aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2009-08-21 08:01:23 +0200
committerUros Bizjak <uros@gcc.gnu.org>2009-08-21 08:01:23 +0200
commit7450a081dba0e01ad1097e8d4798fe59f91ecead (patch)
treead81ecce6e9486fcfb0ac5437f5ec61bb4ecb80a
parent685dca122f12d675ab63e927ce0947531ce27959 (diff)
downloadgcc-7450a081dba0e01ad1097e8d4798fe59f91ecead.zip
gcc-7450a081dba0e01ad1097e8d4798fe59f91ecead.tar.gz
gcc-7450a081dba0e01ad1097e8d4798fe59f91ecead.tar.bz2
alpha.md (exception_receiver): Emit alternative GP load sequence if flag_reorder_blocks_and_partition is set.
* config/alpha/alpha.md (exception_receiver): Emit alternative GP load sequence if flag_reorder_blocks_and_partition is set. (*exception_receiver_2): Also enable when flag_reorder_blocks_and_partition is set. From-SVN: r150984
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/alpha/alpha.md12
2 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c0d98c1..225e96e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-21 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/alpha.md (exception_receiver): Emit alternative
+ GP load sequence if flag_reorder_blocks_and_partition is set.
+ (*exception_receiver_2): Also enable when
+ flag_reorder_blocks_and_partition is set.
+
2009-08-20 Matt Rice <ratmice@gmail.com>
Diego Novillo <dnovillo@google.com>
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 18817c8..67ccff5 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -6855,11 +6855,18 @@
"br $27,$LSJ%=\n$LSJ%=:"
[(set_attr "type" "ibr")])
+;; When flag_reorder_blocks_and_partition is in effect, compiler puts
+;; exception landing pads in a cold section. To prevent inter-section offset
+;; calculation, a jump to original landing pad is emitted in the place of the
+;; original landing pad. Since landing pad is moved, RA-relative GP
+;; calculation in the prologue of landing pad breaks. To solve this problem,
+;; we use alternative GP load approach, as in the case of TARGET_LD_BUGGY_LDGP.
+
(define_expand "exception_receiver"
[(unspec_volatile [(match_dup 0)] UNSPECV_EHR)]
"TARGET_ABI_OSF"
{
- if (TARGET_LD_BUGGY_LDGP)
+ if (TARGET_LD_BUGGY_LDGP || flag_reorder_blocks_and_partition)
operands[0] = alpha_gp_save_rtx ();
else
operands[0] = const0_rtx;
@@ -6867,7 +6874,8 @@
(define_insn "*exception_receiver_2"
[(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)]
- "TARGET_ABI_OSF && TARGET_LD_BUGGY_LDGP"
+ "TARGET_ABI_OSF
+ && (TARGET_LD_BUGGY_LDGP || flag_reorder_blocks_and_partition)"
"ldq $29,%0"
[(set_attr "type" "ild")])