diff options
author | Jim Wilson <wilson@redhat.com> | 2001-09-21 00:00:03 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2001-09-20 17:00:03 -0700 |
commit | f5aee6316d591598ac8574b47b79fa35e10bca2c (patch) | |
tree | 220dcf15cf9235d9adff55d1a0543beacd269e91 /gcc/config/ia64 | |
parent | 91dc6f6e47905cc863d5a70cefd083cad066cb5f (diff) | |
download | gcc-f5aee6316d591598ac8574b47b79fa35e10bca2c.zip gcc-f5aee6316d591598ac8574b47b79fa35e10bca2c.tar.gz gcc-f5aee6316d591598ac8574b47b79fa35e10bca2c.tar.bz2 |
re PR c/3917 (IA-64 assembler output shows erroneous cycle counting)
Fix for PR 3917.
* config/ia64/ia64.c (itanium_split_issue): Allow max 2 FP per cycle.
(insn_matches_slot): Handle TYPE_L and TYPE_X slots when checking
for issue port conflicts.
(cycle_end_fill_slots): TYPE_L instructions take two slots.
From-SVN: r45713
Diffstat (limited to 'gcc/config/ia64')
-rw-r--r-- | gcc/config/ia64/ia64.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index c173b54..9da4270 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -5153,9 +5153,13 @@ itanium_split_issue (p, begin) enum attr_type t = (t0 == TYPE_L ? TYPE_F : t0 == TYPE_X ? TYPE_I : t0); - int max = (t == TYPE_B ? 3 : t == TYPE_F ? 1 : 2); + + /* Itanium can execute up to 3 branches, 2 floating point, 2 memory, and + 2 integer per cycle. */ + int max = (t == TYPE_B ? 3 : 2); if (type_count[t] == max) return i; + type_count[t]++; } return split; @@ -5347,7 +5351,9 @@ insn_matches_slot (p, itype, slot, insn) { int i; for (i = sched_data.first_slot; i < slot; i++) - if (p->t[i] == stype) + if (p->t[i] == stype + || (stype == TYPE_F && p->t[i] == TYPE_L) + || (stype == TYPE_I && p->t[i] == TYPE_X)) return 0; } if (GET_CODE (insn) == CALL_INSN) @@ -5487,6 +5493,12 @@ cycle_end_fill_slots (dump) sched_data.types[slot] = packet->t[slot]; sched_data.insns[slot] = 0; sched_data.stopbit[slot] = 0; + + /* ??? TYPE_L instructions always fill up two slots, but we don't + support TYPE_L nops. */ + if (packet->t[slot] == TYPE_L) + abort (); + slot++; } /* Do _not_ use T here. If T == TYPE_A, then we'd risk changing the @@ -5495,6 +5507,9 @@ cycle_end_fill_slots (dump) sched_data.insns[slot] = tmp_insns[i]; sched_data.stopbit[slot] = 0; slot++; + /* TYPE_L instructions always fill up two slots. */ + if (t == TYPE_L) + slot++; } /* This isn't right - there's no need to pad out until the forced split; |