sparc.md (return): Rewrite length formula.
authorEric Botcazou <ebotcazou@libertysurf.fr>
Fri, 9 Jul 2004 09:35:48 +0000 (11:35 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 9 Jul 2004 09:35:48 +0000 (09:35 +0000)
* config/sparc/sparc.md (return): Rewrite length formula.
* config/sparc/sparc.c (output_return): Pass 1 as 5th
argument to final_scan_insn when in a delay slot.
(output_sibcall): Likewise.

From-SVN: r84352

gcc/ChangeLog
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.md

index 6de0aaf785cfdf942e6578e7ebbe73d10104089f..e16a2a87e4d25d694ad9419af510096c490d819b 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * config/sparc/sparc.md (return): Rewrite length formula.
+       * config/sparc/sparc.c (output_return): Pass 1 as 5th
+       argument to final_scan_insn when in a delay slot.
+       (output_sibcall): Likewise.
+
 2004-07-09  Richard Earnshaw  <rearnsha@arm.com>
 
        * arm.c (arm_cpp_interwork): New variable.
index 26c9e1e35f3e67c57eb76ede4a116434f2716cbe..cfaa34aaaae73bdec27627ccdaedfdc93a9721bd 100644 (file)
@@ -4553,7 +4553,7 @@ output_return (rtx insn)
              epilogue_renumber (&pat, 0);
              fprintf (asm_out_file, "\treturn\t%%i7+%d\n",
                       sparc_skip_caller_unimp ? 12 : 8);
-             final_scan_insn (delay, asm_out_file, 1, 0, 0, NULL);
+             final_scan_insn (delay, asm_out_file, 1, 0, 1, NULL);
            }
          else
            {
@@ -4614,7 +4614,7 @@ output_sibcall (rtx insn, rtx call_operand)
 
          output_asm_insn ("sethi\t%%hi(%a0), %%g1", operands);
          output_asm_insn ("jmp\t%%g1 + %%lo(%a0)", operands);
-         final_scan_insn (delay, asm_out_file, 1, 0, 0, NULL);
+         final_scan_insn (delay, asm_out_file, 1, 0, 1, NULL);
 
          PATTERN (delay) = gen_blockage ();
          INSN_CODE (delay) = -1;
index bccb4eab8e262b494916cb98b2b8abfdd111aba9..dc7ef6e80c0eb0ece7e1bdd809580f413d3944e9 100644 (file)
   "* return output_return (insn);"
   [(set_attr "type" "return")
    (set (attr "length")
-       (if_then_else (eq_attr "leaf_function" "true")
-                     (if_then_else (eq_attr "empty_delay_slot" "true")
-                                   (const_int 2)
-                                   (const_int 1))
-                     (if_then_else (eq_attr "calls_eh_return" "true")
-                                   (if_then_else (eq_attr "delayed_branch" "true")
-                                                 (if_then_else (eq_attr "isa" "v9")
-                                                               (const_int 2)
-                                                               (const_int 3))
-                                                 (if_then_else (eq_attr "isa" "v9")
-                                                               (const_int 3)
-                                                               (const_int 4)))
-                                   (if_then_else (eq_attr "empty_delay_slot" "true")
-                                                 (if_then_else (eq_attr "delayed_branch" "true")
-                                                               (const_int 2)
-                                                               (const_int 3))
-                                                 (const_int 1)))))])
+       (cond [(eq_attr "leaf_function" "true")
+                (if_then_else (eq_attr "empty_delay_slot" "true")
+                              (const_int 2)
+                              (const_int 1))
+              (eq_attr "calls_eh_return" "true")
+                (if_then_else (eq_attr "delayed_branch" "true")
+                              (if_then_else (eq_attr "isa" "v9")
+                                            (const_int 2)
+                                            (const_int 3))
+                              (if_then_else (eq_attr "isa" "v9")
+                                            (const_int 3)
+                                            (const_int 4)))
+              (eq_attr "empty_delay_slot" "true")
+                (if_then_else (eq_attr "delayed_branch" "true")
+                              (const_int 2)
+                              (const_int 3))
+             ] (const_int 1)))])
 
 ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
 ;; all of memory.  This blocks insns from being moved across this point.