Commit 46406379 by Jason Merrill Committed by Jason Merrill

arm.md (return peepholes): Update to reflect the new call insn patterns.

        * 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.

From-SVN: r32788
parent da3d4dfa
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
......
......@@ -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. */
......
......@@ -6356,6 +6356,7 @@
(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)
......@@ -6384,6 +6385,7 @@
[(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)
......@@ -6415,6 +6417,7 @@
[(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)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment