/* Pipeline hazard description translator.
- Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Written by Vladimir Makarov <vmakarov@redhat.com>
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
/* References:
static const char *decl_name (enum decl_mode);
static void decl_mode_check_failed (enum decl_mode, const char *,
- const char *, int, const char *);
+ const char *, int, const char *)
+ ATTRIBUTE_NORETURN;
/* Return string representation of declaration mode MODE. */
static const char *
static const char *regexp_name (enum regexp_mode);
static void regexp_mode_check_failed (enum regexp_mode, const char *,
const char *, int,
- const char *);
+ const char *) ATTRIBUTE_NORETURN;
/* Return string representation of regexp mode MODE. */
}
else
warning
- ("unit `%s' excludes and requires presence of `%s'",
+ (0, "unit `%s' excludes and requires presence of `%s'",
dst->unit_decl->name, unit->name);
}
}
}
else
warning
- ("unit `%s' requires absence and presence of `%s'",
+ (0, "unit `%s' requires absence and presence of `%s'",
dst->unit_decl->name, unit->name);
}
if (no_error_flag)
error ("repeated declaration of automaton `%s'",
DECL_AUTOMATON (decl)->name);
else
- warning ("repeated declaration of automaton `%s'",
+ warning (0, "repeated declaration of automaton `%s'",
DECL_AUTOMATON (decl)->name);
}
}
DECL_BYPASS (decl)->in_insn_name);
else
warning
- ("the same bypass `%s - %s' is already defined",
+ (0, "the same bypass `%s - %s' is already defined",
DECL_BYPASS (decl)->out_insn_name,
DECL_BYPASS (decl)->in_insn_name);
}
if (!w_flag)
error ("automaton `%s' is not used", DECL_AUTOMATON (decl)->name);
else
- warning ("automaton `%s' is not used",
+ warning (0, "automaton `%s' is not used",
DECL_AUTOMATON (decl)->name);
}
}
if (!w_flag)
error ("unit `%s' is not used", DECL_UNIT (decl)->name);
else
- warning ("unit `%s' is not used", DECL_UNIT (decl)->name);
+ warning (0, "unit `%s' is not used", DECL_UNIT (decl)->name);
}
else if (decl->mode == dm_reserv && !DECL_RESERV (decl)->reserv_is_used)
{
if (!w_flag)
error ("reservation `%s' is not used", DECL_RESERV (decl)->name);
else
- warning ("reservation `%s' is not used", DECL_RESERV (decl)->name);
+ warning (0, "reservation `%s' is not used", DECL_RESERV (decl)->name);
}
}
}
static int
first_cycle_unit_presence (state_t state, int unit_num)
{
- int presence_p;
+ alt_state_t alt_state;
if (state->component_states == NULL)
- presence_p = test_unit_reserv (state->reservs, 0, unit_num);
+ return test_unit_reserv (state->reservs, 0, unit_num);
else
- presence_p
- = test_unit_reserv (state->component_states->state->reservs,
- 0, unit_num);
- return presence_p;
+ {
+ for (alt_state = state->component_states;
+ alt_state != NULL;
+ alt_state = alt_state->next_sorted_alt_state)
+ if (test_unit_reserv (alt_state->state->reservs, 0, unit_num))
+ return true;
+ }
+ return false;
}
/* The function returns nonzero value if STATE is not equivalent to
}
/* The following function adds vector with length VECT_LENGTH and
- elements pointed by VECT to table TAB as its line with number
+ elements pointed to by VECT to table TAB as its line with number
VECT_NUM. */
static void
add_vect (state_ainsn_table_t tab, int vect_num, vect_el_t *vect,
int i;
unit_decl_t *units;
- fprintf (output_file, "int\n%s (%s)\n\tconst char *%s;\n",
- GET_CPU_UNIT_CODE_FUNC_NAME, CPU_UNIT_NAME_PARAMETER_NAME,
- CPU_UNIT_NAME_PARAMETER_NAME);
+ fprintf (output_file, "int\n%s (const char *%s)\n",
+ GET_CPU_UNIT_CODE_FUNC_NAME, CPU_UNIT_NAME_PARAMETER_NAME);
fprintf (output_file, "{\n struct %s {const char *%s; int %s;};\n",
NAME_CODE_STRUCT_NAME, NAME_MEMBER_NAME, CODE_MEMBER_NAME);
fprintf (output_file, " int %s, %s, %s, %s;\n", CMP_VARIABLE_NAME,
{
automaton_t automaton;
- fprintf (output_file, "int\n%s (%s, %s)\n\t%s %s;\n\tint %s;\n",
- CPU_UNIT_RESERVATION_P_FUNC_NAME, STATE_NAME,
- CPU_CODE_PARAMETER_NAME, STATE_TYPE_NAME, STATE_NAME,
+ fprintf (output_file, "int\n%s (%s %s, int %s)\n",
+ CPU_UNIT_RESERVATION_P_FUNC_NAME,
+ STATE_TYPE_NAME, STATE_NAME,
CPU_CODE_PARAMETER_NAME);
fprintf (output_file, "{\n gcc_assert (%s >= 0 && %s < %d);\n",
CPU_CODE_PARAMETER_NAME, CPU_CODE_PARAMETER_NAME,
reserv_ainsn->insn_reserv_decl->name);
else
warning
- ("Automaton `%s': Insn `%s' will never be issued",
+ (0, "Automaton `%s': Insn `%s' will never be issued",
automaton->corresponding_automaton_decl->name,
reserv_ainsn->insn_reserv_decl->name);
}
error ("Insn `%s' will never be issued",
reserv_ainsn->insn_reserv_decl->name);
else
- warning ("Insn `%s' will never be issued",
+ warning (0, "Insn `%s' will never be issued",
reserv_ainsn->insn_reserv_decl->name);
}
}