OSDN Git Service

PR middle-end/50283
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Dec 2011 02:08:10 +0000 (02:08 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Dec 2011 02:08:10 +0000 (02:08 +0000)
* config/pa/pa.md (in_branch_delay): Disallow frame related insns.
(in_nullified_branch_delay): Likewise.
(in_call_delay): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181868 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/pa/pa.md

index dceaefc..addee39 100644 (file)
@@ -1,3 +1,10 @@
+2011-11-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR middle-end/50283
+       * config/pa/pa.md (in_branch_delay): Disallow frame related insns.
+       (in_nullified_branch_delay): Likewise.
+       (in_call_delay): Likewise.
+
 2011-11-30  Richard Henderson  <rth@redhat.com>
 
        * predict.c (expr_expected_value_1): Assume compare-and-swap builtin
index 1be614c..d5417fe 100644 (file)
 
 ;; Attributes for instruction and branch scheduling
 
-;; For conditional branches.
+;; For conditional branches. Frame related instructions are not allowed
+;; because they confuse the unwind support.
 (define_attr "in_branch_delay" "false,true"
   (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
-                    (eq_attr "length" "4"))
+                    (eq_attr "length" "4")
+                    (not (match_test "RTX_FRAME_RELATED_P (insn)")))
                (const_string "true")
                (const_string "false")))
 
 ;; even if the instruction is nullified.
 (define_attr "in_nullified_branch_delay" "false,true"
   (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch")
-                    (eq_attr "length" "4"))
+                    (eq_attr "length" "4")
+                    (not (match_test "RTX_FRAME_RELATED_P (insn)")))
                (const_string "true")
                (const_string "false")))
 
 ;; delay slot.
 (define_attr "in_call_delay" "false,true"
   (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
-             (eq_attr "length" "4"))
+             (eq_attr "length" "4")
+             (not (match_test "RTX_FRAME_RELATED_P (insn)")))
           (const_string "true")
         (eq_attr "type" "uncond_branch")
           (if_then_else (match_test "TARGET_JUMP_IN_DELAY")