]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/3917 (IA-64 assembler output shows erroneous cycle counting)
authorJim Wilson <wilson@redhat.com>
Fri, 21 Sep 2001 00:00:03 +0000 (00:00 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 21 Sep 2001 00:00:03 +0000 (17:00 -0700)
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

gcc/ChangeLog
gcc/config/ia64/ia64.c

index 8072f94329f506ecd53a8673182bff1b1087b9c9..c0190fc2cd6172e150c8f9555721fcc7aefc6cfd 100644 (file)
@@ -1,3 +1,10 @@
+2001-09-20  Jim Wilson  <wilson@redhat.com>
+
+       * 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  <amacleod@redhat.com>
 
        * testsuite/gcc.c-torture/execute/990208-1.x: New. XFAIL at -O3
index c173b54a5c45d6f266f891238ab8e8224a431127..9da42706d00c497da5ba9f6784cad67917f971ea 100644 (file)
@@ -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;