OSDN Git Service

(return peepholes): Add QImode and HImode move/return patterns.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Dec 1992 00:42:21 +0000 (00:42 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Dec 1992 00:42:21 +0000 (00:42 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2876 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/sparc/sparc.md

index 6cf9eaa..33b50f9 100644 (file)
 
 ;; 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"))