summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-05-06 21:45:57 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-05-06 21:45:57 +0000
commit6e9111049326e30cc24f1a70908390e94afba808 (patch)
treee038380434ca1833c34d5d9af613c1e042bece92 /gcc/emit-rtl.c
parentb84155cdbf6236c8f5e69f9f63c6aa79d98865c8 (diff)
downloadgcc-6e9111049326e30cc24f1a70908390e94afba808.tar.gz
(make_call_insn_raw): New function.
(emit_call_insn{,_before}): Use make_call_insn_raw. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7238 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 6c5b17aee2c..607dc8ae353 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2084,6 +2084,26 @@ make_jump_insn_raw (pattern)
return insn;
}
+
+/* Like `make_insn' but make a CALL_INSN instead of an insn. */
+
+static rtx
+make_call_insn_raw (pattern)
+ rtx pattern;
+{
+ register rtx insn;
+
+ insn = rtx_alloc (CALL_INSN);
+ INSN_UID (insn) = cur_insn_uid++;
+
+ PATTERN (insn) = pattern;
+ INSN_CODE (insn) = -1;
+ LOG_LINKS (insn) = NULL;
+ REG_NOTES (insn) = NULL;
+ CALL_INSN_FUNCTION_USAGE (insn) = NULL;
+
+ return insn;
+}
/* Add INSN to the end of the doubly-linked list.
INSN may be an INSN, JUMP_INSN, CALL_INSN, CODE_LABEL, BARRIER or NOTE. */
@@ -2292,8 +2312,17 @@ rtx
emit_call_insn_before (pattern, before)
register rtx pattern, before;
{
- rtx insn = emit_insn_before (pattern, before);
- PUT_CODE (insn, CALL_INSN);
+ register rtx insn;
+
+ if (GET_CODE (pattern) == SEQUENCE)
+ insn = emit_insn_before (pattern, before);
+ else
+ {
+ insn = make_call_insn_raw (pattern);
+ add_insn_after (insn, PREV_INSN (before));
+ PUT_CODE (insn, CALL_INSN);
+ }
+
return insn;
}
@@ -2609,7 +2638,7 @@ emit_call_insn (pattern)
return emit_insn (pattern);
else
{
- register rtx insn = make_insn_raw (pattern);
+ register rtx insn = make_call_insn_raw (pattern);
add_insn (insn);
PUT_CODE (insn, CALL_INSN);
return insn;