summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-10 21:06:07 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-10 21:06:07 +0000
commitdeeb83d60346e094b6636a49606677384a699502 (patch)
tree82e7ddb63b466a4273220496cb85c8b9ec5c360e /gcc/haifa-sched.c
parentb962deb33164ab6acce9fc2d851be593270ca85a (diff)
downloadgcc-deeb83d60346e094b6636a49606677384a699502.tar.gz
2004-06-10 Vladimir Makarov <vmakarov@redhat.com>
PR target/15653 * haifa-sched.c (schedule_block): Finish cycle after issuing asm insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index af8b8a70157..033aaae1757 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -2378,6 +2378,7 @@ schedule_block (int b, int rgn_n_insns)
{
rtx insn;
int cost;
+ bool asm_p = false;
if (sched_verbose >= 2)
{
@@ -2435,9 +2436,9 @@ schedule_block (int b, int rgn_n_insns)
memcpy (temp_state, curr_state, dfa_state_size);
if (recog_memoized (insn) < 0)
{
- if (!first_cycle_insn_p
- && (GET_CODE (PATTERN (insn)) == ASM_INPUT
- || asm_noperands (PATTERN (insn)) >= 0))
+ asm_p = (GET_CODE (PATTERN (insn)) == ASM_INPUT
+ || asm_noperands (PATTERN (insn)) >= 0);
+ if (!first_cycle_insn_p && asm_p)
/* This is asm insn which is tryed to be issued on the
cycle not first. Issue it on the next cycle. */
cost = 1;
@@ -2552,6 +2553,10 @@ schedule_block (int b, int rgn_n_insns)
can_issue_more--;
advance = schedule_insn (insn, &ready, clock_var);
+
+ /* After issuing an asm insn we should start a new cycle. */
+ if (advance == 0 && asm_p)
+ advance = 1;
if (advance != 0)
break;