From: Jim Wilson Date: Fri, 21 Sep 2001 00:00:03 +0000 (+0000) Subject: re PR c/3917 (IA-64 assembler output shows erroneous cycle counting) X-Git-Tag: prereleases/libstdc++-3.0.95~2024 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5aee6316d591598ac8574b47b79fa35e10bca2c;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8072f94329f5..c0190fc2cd61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-09-20 Jim Wilson + + * 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. + 2001-09-20 Andrew MacLeod * testsuite/gcc.c-torture/execute/990208-1.x: New. XFAIL at -O3 diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index c173b54a5c45..9da42706d00c 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;