(*return_addsi): Change condition to exclude both ints.

(*return_adddi): Likewise.
(*return_subsi): New pattern.

From-SVN: r13868
This commit is contained in:
Richard Kenner 1997-04-13 09:47:25 -04:00
parent 7c03e72e04
commit eead6b5bda
1 changed files with 16 additions and 15 deletions

View File

@ -1,5 +1,5 @@
;;- Machine description for SPARC chip for GNU C compiler
;; Copyright (C) 1987, 88, 89, 92-95, 1996 Free Software Foundation, Inc.
;; Copyright (C) 1987, 88, 89, 92-96, 1997 Free Software Foundation, Inc.
;; Contributed by Michael Tiemann (tiemann@cygnus.com)
;; 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
;; at Cygnus Support.
@ -5975,7 +5975,9 @@
(plus:SI (match_operand:SI 1 "arith_operand" "%r")
(match_operand:SI 2 "arith_operand" "rI")))
(return)]
"! TARGET_EPILOGUE && ! TARGET_LIVE_G0"
"! TARGET_EPILOGUE && ! TARGET_LIVE_G0
&& (register_operand (operands[1], SImode)
|| register_operand (operands[2], SImode))"
"*
{
if (! TARGET_ARCH64 && current_function_returns_struct)
@ -5995,24 +5997,23 @@
(define_insn "*return_adddi"
[(set (match_operand:DI 0 "restore_operand" "")
(plus:DI (match_operand:DI 1 "arith_operand" "%r")
(plus:DI (match_operand:DI 1 "arith_double_operand" "%r")
(match_operand:DI 2 "arith_double_operand" "rHI")))
(return)]
"TARGET_ARCH64 && ! TARGET_EPILOGUE"
"TARGET_ARCH64 && ! TARGET_EPILOGUE
&& (register_operand (operands[1], DImode)
|| register_operand (operands[2], DImode))"
"ret\;restore %r1,%2,%Y0"
[(set_attr "type" "multi")])
;; Turned off because it should never match (subtracting a constant
;; is turned into addition) and because it would do the wrong thing
;; when operand 2 is -4096 (--4096 == 4096 is not a valid immediate).
;;(define_insn "*minus_const"
;; [(set (match_operand:SI 0 "restore_operand" "")
;; (minus:SI (match_operand:SI 1 "register_operand" "r")
;; (match_operand:SI 2 "small_int" "I")))
;; (return)]
;; "! TARGET_EPILOGUE"
;; "ret\;restore %1,-(%2),%Y0"
;; [(set_attr "type" "multi")])
(define_insn "*return_subsi"
[(set (match_operand:SI 0 "restore_operand" "")
(minus:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "small_int" "I")))
(return)]
"! TARGET_EPILOGUE && INTVAL (operands[2]) != -4096"
"ret\;restore %1,%n2,%Y0"
[(set_attr "type" "multi")])
;; The following pattern is only generated by delayed-branch scheduling,
;; when the insn winds up in the epilogue.