aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E Wilson <wilson@specifixinc.com>2005-03-16 19:51:09 -0800
committerJim Wilson <wilson@gcc.gnu.org>2005-03-16 19:51:09 -0800
commit68e11b42afd5319521eaddf015c2d35aeb1d8c8d (patch)
tree30446153ed8ba89767592731d666e875975bbbff
parentfa41042fffc4553e12fcbaf3fa21b50736274e56 (diff)
downloadgcc-68e11b42afd5319521eaddf015c2d35aeb1d8c8d.zip
gcc-68e11b42afd5319521eaddf015c2d35aeb1d8c8d.tar.gz
gcc-68e11b42afd5319521eaddf015c2d35aeb1d8c8d.tar.bz2
patch to fix extraneous nop at function start, bug from David Mosberger
patch to fix extraneous nop at function start, bug from David Mosberger * config/ia64/ia64.c (issue_nops_and_insn): Check first_insn attribute, and return without creating new state if before_nops_num is nonzero. * config/ia64/ia64.md (first_insn): New attribute. (alloc): Set it to yes. From-SVN: r96597
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/ia64/ia64.c11
-rw-r--r--gcc/config/ia64/ia64.md8
3 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 215b553..d00f7ca 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-16 James E. Wilson <wilson@specifixinc.com>
+
+ * config/ia64/ia64.c (issue_nops_and_insn): Check first_insn attribute,
+ and return without creating new state if before_nops_num is nonzero.
+ * config/ia64/ia64.md (first_insn): New attribute.
+ (alloc): Set it to yes.
+
2005-03-16 Daniel Berlin <dberlin@dberlin.org>
* tree-vectorizer.c (new_vec_stmt_info): Initialize
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index bca447b..0b28464 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -6433,6 +6433,17 @@ issue_nops_and_insn (struct bundle_state *originator, int before_nops_num,
}
else
{
+ /* If this is an insn that must be first in a group, then don't allow
+ nops to be emitted before it. Currently, alloc is the only such
+ supported instruction. */
+ /* ??? The bundling automatons should handle this for us, but they do
+ not yet have support for the first_insn attribute. */
+ if (before_nops_num > 0 && get_attr_first_insn (insn) == FIRST_INSN_YES)
+ {
+ free_bundle_state (curr_state);
+ return;
+ }
+
state_transition (curr_state->dfa_state, dfa_pre_cycle_insn);
state_transition (curr_state->dfa_state, NULL);
curr_state->cost++;
diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md
index cb5dd10..365c0a8 100644
--- a/gcc/config/ia64/ia64.md
+++ b/gcc/config/ia64/ia64.md
@@ -163,6 +163,11 @@
(define_attr "empty" "no,yes" (const_string "no"))
+;; True iff this insn must be the first insn of an instruction group.
+;; This is true for the alloc instruction, and will also be true of others
+;; when we have full intrinsics support.
+
+(define_attr "first_insn" "no,yes" (const_string "no"))
;; DFA descriptions of ia64 processors used for insn scheduling and
;; bundling.
@@ -5703,7 +5708,8 @@
""
"alloc %0 = ar.pfs, %1, %2, %3, %4"
[(set_attr "itanium_class" "syst_m0")
- (set_attr "predicable" "no")])
+ (set_attr "predicable" "no")
+ (set_attr "first_insn" "yes")])
;; Modifies ar.unat
(define_expand "gr_spill"