aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-12-15 16:42:21 -0800
committerJim Wilson <wilson@gcc.gnu.org>1992-12-15 16:42:21 -0800
commit262121f07030ee05586e59aad705082990776b21 (patch)
tree6444bf620127e2736378622f3a2eb03d0a8841ae /gcc
parent190315a70fb4c830a6a4ac6081f15a8aab0d9ffd (diff)
downloadgcc-262121f07030ee05586e59aad705082990776b21.zip
gcc-262121f07030ee05586e59aad705082990776b21.tar.gz
gcc-262121f07030ee05586e59aad705082990776b21.tar.bz2
(return peepholes): Add QImode and HImode move/return patterns.
From-SVN: r2876
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/sparc.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 6cf9eaa..33b50f9 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -3050,6 +3050,37 @@
;; Return peepholes. First the "normal" ones
+;; ??? There are QImode, HImode, and SImode versions of this pattern.
+;; It might be possible to write one more general pattern instead of three.
+
+(define_insn ""
+ [(set (match_operand:QI 0 "restore_operand" "")
+ (match_operand:QI 1 "arith_operand" "rI"))
+ (return)]
+ "! TARGET_EPILOGUE"
+ "*
+{
+ if (current_function_returns_struct)
+ return \"jmp %%i7+12\;restore %%g0,%1,%Y0\";
+ else
+ return \"ret\;restore %%g0,%1,%Y0\";
+}"
+ [(set_attr "type" "multi")])
+
+(define_insn ""
+ [(set (match_operand:HI 0 "restore_operand" "")
+ (match_operand:HI 1 "arith_operand" "rI"))
+ (return)]
+ "! TARGET_EPILOGUE"
+ "*
+{
+ if (current_function_returns_struct)
+ return \"jmp %%i7+12\;restore %%g0,%1,%Y0\";
+ else
+ return \"ret\;restore %%g0,%1,%Y0\";
+}"
+ [(set_attr "type" "multi")])
+
(define_insn ""
[(set (match_operand:SI 0 "restore_operand" "")
(match_operand:SI 1 "arith_operand" "rI"))