OSDN Git Service

* config/arm/arm.md (return peepholes): Update to reflect the new
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Mar 2000 19:42:28 +0000 (19:42 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Mar 2000 19:42:28 +0000 (19:42 +0000)
        call insn patterns.
        * config/arm/arm.c (arm_volatile_func): Also check
        current_function_nothrow.
        (output_return_instruction, output_func_prologue): Use it.
        (arm_output_epilogue, arm_expand_prologue): Likewise.

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

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.md

index 2e679b4..41f3741 100644 (file)
@@ -1,3 +1,12 @@
+2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
+
+       * config/arm/arm.md (return peepholes): Update to reflect the new
+       call insn patterns.
+       * config/arm/arm.c (arm_volatile_func): Also check
+       current_function_nothrow.
+       (output_return_instruction, output_func_prologue): Use it.
+       (arm_output_epilogue, arm_expand_prologue): Likewise.
+
 2000-03-27  Tom Tromey  <tromey@cygnus.com>
 
        * gcc.c (handle_braces): In {x*...} case, break out of loop if
index 3177a64..adeeae7 100644 (file)
@@ -5781,8 +5781,7 @@ output_return_instruction (operand, really_return, reverse)
 {
   char instr[100];
   int reg, live_regs = 0;
-  int volatile_func = (optimize > 0 
-                      && TREE_THIS_VOLATILE (current_function_decl));
+  int volatile_func = arm_volatile_func ();
 
   return_used_this_function = 1;
 
@@ -5914,7 +5913,8 @@ output_return_instruction (operand, really_return, reverse)
 int
 arm_volatile_func ()
 {
-  return (optimize > 0 && TREE_THIS_VOLATILE (current_function_decl));
+  return (optimize > 0 && current_function_nothrow
+         && TREE_THIS_VOLATILE (current_function_decl));
 }
 
 /* Write the function name into the code section, directly preceding
@@ -5977,8 +5977,7 @@ output_func_prologue (f, frame_size)
      int frame_size;
 {
   int reg, live_regs_mask = 0;
-  int volatile_func = (optimize > 0
-                      && TREE_THIS_VOLATILE (current_function_decl));
+  int volatile_func = arm_volatile_func ();
 
   /* Nonzero if we must stuff some register arguments onto the stack as if
      they were passed there.  */
@@ -6056,8 +6055,7 @@ arm_output_epilogue ()
   rtx operands[3];
   int frame_size = get_frame_size ();
   FILE *f = asm_out_file;
-  int volatile_func = (optimize > 0
-                      && TREE_THIS_VOLATILE (current_function_decl));
+  int volatile_func = arm_volatile_func ();
 
   if (use_return_insn (FALSE) && return_used_this_function)
     return "";
@@ -6408,8 +6406,7 @@ arm_expand_prologue ()
   int store_arg_regs = 0;
   /* If this function doesn't return, then there is no need to push
      the call-saved regs.  */
-  int volatile_func = (optimize > 0
-                      && TREE_THIS_VOLATILE (current_function_decl));
+  int volatile_func = arm_volatile_func ();
   rtx insn;
 
   /* Naked functions don't have prologues.  */
index ed1a3da..314beac 100644 (file)
 (define_peephole
   [(parallel [(call (mem:SI (match_operand:SI 0 "" "X"))
                          (match_operand:SI 1 "general_operand" "g"))
+                   (use (match_operand:SI 2 "" ""))
                    (clobber (reg:SI 14))])
    (return)]
   "(GET_CODE (operands[0]) == SYMBOL_REF && USE_RETURN_INSN (FALSE)
   [(parallel [(set (match_operand 0 "s_register_operand" "=rf")
                   (call (mem:SI (match_operand:SI 1 "" "X"))
                         (match_operand:SI 2 "general_operand" "g")))
+             (use (match_operand:SI 3 "" ""))
              (clobber (reg:SI 14))])
    (return)]
   "(GET_CODE (operands[1]) == SYMBOL_REF && USE_RETURN_INSN (FALSE)
   [(parallel [(set (match_operand 0 "s_register_operand" "=rf")
                   (call (mem:SI (match_operand:SI 1 "" "X"))
                         (match_operand:SI 2 "general_operand" "g")))
+             (use (match_operand:SI 3 "" ""))
              (clobber (reg:SI 14))])
    (use (match_dup 0))
    (return)]