summaryrefslogtreecommitdiff
path: root/gcc/config/ns32k/ns32k.md
diff options
context:
space:
mode:
authorwood <wood@138bc75d-0d04-0410-961f-82ee72b054a4>1993-03-23 12:50:44 +0000
committerwood <wood@138bc75d-0d04-0410-961f-82ee72b054a4>1993-03-23 12:50:44 +0000
commit7283a35a9ed978681c8e8d8bbca023b3bb465fec (patch)
treeb5a48992266a1dbdbe2c55a98e222bde9df68113 /gcc/config/ns32k/ns32k.md
parentb405f7bfb85d96272541bb4e01d9572dbc3e89f6 (diff)
downloadgcc-7283a35a9ed978681c8e8d8bbca023b3bb465fec.tar.gz
(untyped_call, blockage): New patterns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3839 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ns32k/ns32k.md')
-rw-r--r--gcc/config/ns32k/ns32k.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/config/ns32k/ns32k.md b/gcc/config/ns32k/ns32k.md
index b3ea5ef27d4..dd0c21f07d4 100644
--- a/gcc/config/ns32k/ns32k.md
+++ b/gcc/config/ns32k/ns32k.md
@@ -2273,6 +2273,43 @@
return \"jsr %1\";
}")
+;; Call subroutine returning any type.
+
+(define_expand "untyped_call"
+ [(parallel [(call (match_operand 0 "" "")
+ (const_int 0))
+ (match_operand 1 "" "")
+ (match_operand 2 "" "")])]
+ ""
+ "
+{
+ int i;
+
+ emit_call_insn (gen_call (operands[0], const0_rtx, NULL, const0_rtx));
+
+ for (i = 0; i < XVECLEN (operands[2], 0); i++)
+ {
+ rtx set = XVECEXP (operands[2], 0, i);
+ emit_move_insn (SET_DEST (set), SET_SRC (set));
+ }
+
+ /* The optimizer does not know that the call sets the function value
+ registers we stored in the result block. We avoid problems by
+ claiming that all hard registers are used and clobbered at this
+ point. */
+ emit_insn (gen_blockage ());
+
+ DONE;
+}")
+
+;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
+;; all of memory. This blocks insns from being moved across this point.
+
+(define_insn "blockage"
+ [(unspec_volatile [(const_int 0)] 0)]
+ ""
+ "")
+
(define_insn "return"
[(return)]
"0"