This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: gas fix to IA64 DV
- From: Kapil Chowksey <kchowkse at in dot ibm dot com>
- To: binutils at sourceware dot org
- Date: Sat, 3 Feb 2007 15:51:02 +0530
- Subject: PATCH: gas fix to IA64 DV
Here's a small patch to fix a spurious WAW hazard reported on this
for p2:
{.mmi
cmp.eq.or.andcm p3,p2=r49,r39
cmp.ne.and p2,p1=r49,r36
nop.i 0 ;;
}
Index: tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.190
diff -b -u -r1.190 tc-ia64.c
--- tc-ia64.c 1 Feb 2007 14:12:18 -0000 1.190
+++ tc-ia64.c 3 Feb 2007 10:06:06 -0000
@@ -9001,14 +9001,18 @@
int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
+ int and = strstr (idesc->name, "and") != NULL;
+ int or = strstr (idesc->name, "or") != NULL;
if ((idesc->operands[0] == IA64_OPND_P1
|| idesc->operands[0] == IA64_OPND_P2)
&& p1 >= 1 && p1 < 16)
{
specs[count] = tmpl;
- specs[count].cmp_type =
- (or_andcm ? CMP_OR : (and_orcm ? CMP_AND : CMP_NONE));
+ specs[count].cmp_type = (or_andcm ? CMP_OR :
+ (and_orcm ? CMP_AND :
+ (and ? CMP_AND :
+ (or ? CMP_OR : CMP_NONE))));
specs[count++].index = p1;
}
if ((idesc->operands[1] == IA64_OPND_P1
@@ -9016,8 +9020,10 @@
&& p2 >= 1 && p2 < 16)
{
specs[count] = tmpl;
- specs[count].cmp_type =
- (or_andcm ? CMP_AND : (and_orcm ? CMP_OR : CMP_NONE));
+ specs[count].cmp_type = (or_andcm ? CMP_AND :
+ (and_orcm ? CMP_OR :
+ (and ? CMP_AND :
+ (or ? CMP_OR : CMP_NONE))));
specs[count++].index = p2;
}
}
@@ -9123,14 +9129,18 @@
int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
+ int and = strstr (idesc->name, "and") != NULL;
+ int or = strstr (idesc->name, "or") != NULL;
if ((idesc->operands[0] == IA64_OPND_P1
|| idesc->operands[0] == IA64_OPND_P2)
&& p1 >= 16 && p1 < 63)
{
specs[count] = tmpl;
- specs[count].cmp_type =
- (or_andcm ? CMP_OR : (and_orcm ? CMP_AND : CMP_NONE));
+ specs[count].cmp_type = (or_andcm ? CMP_OR :
+ (and_orcm ? CMP_AND :
+ (and ? CMP_AND :
+ (or ? CMP_OR : CMP_NONE))));
specs[count++].index = p1;
}
if ((idesc->operands[1] == IA64_OPND_P1
@@ -9138,8 +9148,10 @@
&& p2 >= 16 && p2 < 63)
{
specs[count] = tmpl;
- specs[count].cmp_type =
- (or_andcm ? CMP_AND : (and_orcm ? CMP_OR : CMP_NONE));
+ specs[count].cmp_type = (or_andcm ? CMP_AND :
+ (and_orcm ? CMP_OR :
+ (and ? CMP_AND :
+ (or ? CMP_OR : CMP_NONE))));
specs[count++].index = p2;
}
}
@@ -9587,22 +9599,28 @@
int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
+ int and = strstr (idesc->name, "and") != NULL;
+ int or = strstr (idesc->name, "or") != NULL;
if (p1 == 63
&& (idesc->operands[0] == IA64_OPND_P1
|| idesc->operands[0] == IA64_OPND_P2))
{
specs[count] = tmpl;
- specs[count++].cmp_type =
- (or_andcm ? CMP_OR : (and_orcm ? CMP_AND : CMP_NONE));
+ specs[count].cmp_type = (or_andcm ? CMP_OR :
+ (and_orcm ? CMP_AND :
+ (and ? CMP_AND :
+ (or ? CMP_OR : CMP_NONE))));
}
if (p2 == 63
&& (idesc->operands[1] == IA64_OPND_P1
|| idesc->operands[1] == IA64_OPND_P2))
{
specs[count] = tmpl;
- specs[count++].cmp_type =
- (or_andcm ? CMP_AND : (and_orcm ? CMP_OR : CMP_NONE));
+ specs[count].cmp_type = (or_andcm ? CMP_AND :
+ (and_orcm ? CMP_OR :
+ (and ? CMP_AND :
+ (or ? CMP_OR : CMP_NONE))));
}
}
else