+2005-02-15 Jan Beulich <jbeulich@novell.com>
+
+ * config/tc-ia64.c: Include limits.h (if available).
+ (gr_values[0]): Set path to INT_MAX.
+ (dot_reg_val): Don't allow changing value of r0. Limit range of
+ general registers at r127.
+ (specify_resource): Default resource index is -1. Don't set resource
+ index (in case IA64_RS_RSE) without setting the specific flag.
+ (note_register_values): Check operand is O_constant before tracking
+ input value of moves. Add tracking for dep.z with constant inputs.
+ (print_dependency): Resource index of specific resource may be zero.
+ (check_dependencies): Likewise.
+
2005-02-15 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (parse_operands): New local variables reg1, reg2,
#include "elf/ia64.h"
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
#define NELEMS(a) ((int) (sizeof (a)/sizeof ((a)[0])))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
unsigned known:1;
int path;
valueT value;
-} gr_values[128] = {{ 1, 0, 0 }};
+} gr_values[128] = {
+ {
+ 1,
+#ifdef INT_MAX
+ INT_MAX,
+#else
+ (((1 << (8 * sizeof(gr_values->path) - 2)) - 1) << 1) + 1,
+#endif
+ 0
+ }
+};
/* Remember the alignment frag. */
static fragS *align_frag;
{
valueT value = get_absolute_expression ();
int regno = reg.X_add_number;
- if (regno < REG_GR || regno > REG_GR + 128)
+ if (regno <= REG_GR || regno > REG_GR + 127)
as_warn (_("Register value annotation ignored"));
else
{
tmpl.link_to_qp_branch = 1;
tmpl.mem_offset.hint = 0;
tmpl.specific = 1;
- tmpl.index = 0;
+ tmpl.index = -1;
tmpl.cmp_type = CMP_NONE;
#define UNHANDLED \
if (idesc->operands[0] == IA64_OPND_AR3
&& CURR_SLOT.opnd[0].X_add_number - REG_AR == AR_BSPSTORE)
{
- specs[count] = tmpl;
- specs[count++].index = 0; /* IA64_RSE_BSPLOAD/RNATBITINDEX */
+ specs[count++] = tmpl;
}
}
else
else if (idesc->operands[0] == IA64_OPND_R1
&& (idesc->operands[1] == IA64_OPND_IMM22
|| idesc->operands[1] == IA64_OPND_IMMU64)
+ && CURR_SLOT.opnd[1].X_op == O_constant
&& (strcmp (idesc->name, "mov") == 0
|| strcmp (idesc->name, "movl") == 0))
{
}
}
}
+ /* Look for dep.z imm insns. */
+ else if (idesc->operands[0] == IA64_OPND_R1
+ && idesc->operands[1] == IA64_OPND_IMM8
+ && strcmp (idesc->name, "dep.z") == 0)
+ {
+ int regno = CURR_SLOT.opnd[0].X_add_number - REG_GR;
+ if (regno > 0 && regno < NELEMS (gr_values))
+ {
+ valueT value = CURR_SLOT.opnd[1].X_add_number;
+
+ if (CURR_SLOT.opnd[3].X_add_number < 64)
+ value &= ((valueT)1 << CURR_SLOT.opnd[3].X_add_number) - 1;
+ value <<= CURR_SLOT.opnd[2].X_add_number;
+ gr_values[regno].known = 1;
+ gr_values[regno].value = value;
+ gr_values[regno].path = md.path;
+ if (md.debug_dv)
+ {
+ fprintf (stderr, " Know gr%d = ", regno);
+ fprintf_vma (stderr, gr_values[regno].value);
+ fputs ("\n", stderr);
+ }
+ }
+ }
else
{
clear_qp_mutex (qp_changemask);
fprintf (stderr, " %s %s '%s'",
action, dv_mode[(regdeps[depind].dependency)->mode],
(regdeps[depind].dependency)->name);
- if (regdeps[depind].specific && regdeps[depind].index != 0)
+ if (regdeps[depind].specific && regdeps[depind].index >= 0)
fprintf (stderr, " (%d)", regdeps[depind].index);
if (regdeps[depind].mem_offset.hint)
{
if (path != 0)
sprintf (pathmsg, " when entry is at label '%s'",
md.entry_labels[path - 1]);
- if (rs->specific && rs->index != 0)
+ if (matchtype == 1 && rs->index >= 0)
sprintf (indexmsg, ", specific resource number is %d",
rs->index);
sprintf (msg, "Use of '%s' %s %s dependency '%s' (%s)%s%s",
--- /dev/null
+.*: Assembler messages:
+.*:11: Warning: Use of 'mov' .* WAW dependency 'RR#' \(impliedf\), specific resource number is 0
+.*:11: Warning: Only the first path encountering the conflict is reported
+.*:10: Warning: This is the location of the conflicting usage
+#...
+.*:25: Warning: Use of 'mov' .* WAW dependency 'RR#' \(impliedf\), specific resource number is 0
+.*:25: Warning: Only the first path encountering the conflict is reported
+.*:24: Warning: This is the location of the conflicting usage
+#...
+.*:32: Warning: Use of 'mov' .* WAW dependency 'RR#' \(impliedf\)
+.*:32: Warning: Only the first path encountering the conflict is reported
+.*:31: Warning: This is the location of the conflicting usage
+#...
+.*:46: Warning: Use of 'mov' .* WAW dependency 'RR#' \(impliedf\), specific resource number is 0
+.*:46: Warning: Only the first path encountering the conflict is reported
+.*:45: Warning: This is the location of the conflicting usage
+#pass