INSERT_FIELD_AND_CONTINUE (opcode, cond, 0);
/* Handle an add condition. */
+ case 'A':
case 'a':
cmpltr = 0;
flag = 0;
if (*s == ',')
{
s++;
+
+ /* 64 bit conditions. */
+ if (*args == 'A')
+ {
+ if (*s == '*')
+ s++;
+ else
+ break;
+ }
name = s;
+
while (*s != ',' && *s != ' ' && *s != '\t')
s += 1;
c = *s;
cmpltr = 7;
flag = 1;
}
- else
+ /* ",*" is a valid condition. */
+ else if (*args == 'a')
as_bad (_("Invalid Add Condition: %s"), name);
*s = c;
}
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
+ /* Handle negated add and branch condition. */
+ case 'D':
+ abort ();
+
+ /* Handle wide-mode non-negated add and branch condition. */
+ case 'w':
+ abort ();
+
+ /* Handle wide-mode negated add and branch condition. */
+ case 'W':
+ abort();
+
/* Handle a negated or non-negated add and branch
condition. */
case '@':
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
/* Handle branch on bit conditions. */
+ case 'B':
case 'b':
cmpltr = 0;
if (*s == ',')
{
s++;
+
+ if (*args == 'B')
+ {
+ if (*s == '*')
+ s++;
+ else
+ break;
+ }
+
if (strncmp (s, "<", 1) == 0)
{
cmpltr = 0;
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 15);
/* Handle a compare/subtract condition. */
+ case 'S':
case 's':
cmpltr = 0;
flag = 0;
if (*s == ',')
{
s++;
+
+ /* 64 bit conditions. */
+ if (*args == 'S')
+ {
+ if (*s == '*')
+ s++;
+ else
+ break;
+ }
name = s;
+
while (*s != ',' && *s != ' ' && *s != '\t')
s += 1;
c = *s;
cmpltr = 7;
flag = 1;
}
- else
+ /* ",*" is a valid condition. */
+ else if (*args != 'S')
as_bad (_("Invalid Compare/Subtract Condition: %s"),
name);
*s = c;
cmpltr = 0;
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
+
+ /* Handle a negated compare condition. */
+ case 'T':
+ abort ();
+
+ /* Handle a 64 bit non-negated compare condition. */
+ case 'r':
+ abort ();
+
+ /* Handle a 64 bit negated compare condition. */
+ case 'R':
+ abort ();
+
+ /* Handle a 64 bit cmpib condition. */
+ case 'Q':
+ abort ();
/* Handle a negated or non-negated compare/subtract
condition. */
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
/* Handle a logical instruction condition. */
+ case 'L':
case 'l':
cmpltr = 0;
flag = 0;
if (*s == ',')
{
s++;
+
+ /* 64 bit conditions. */
+ if (*args == 'L')
+ {
+ if (*s == '*')
+ s++;
+ else
+ break;
+ }
name = s;
+
while (*s != ',' && *s != ' ' && *s != '\t')
s += 1;
c = *s;
cmpltr = 7;
flag = 1;
}
- else
+ /* ",*" is a valid condition. */
+ else if (*args != 'L')
as_bad (_("Invalid Logical Instruction Condition."));
*s = c;
}
INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
/* Handle a shift/extract/deposit condition. */
+ case 'X':
case 'x':
case 'y':
cmpltr = 0;
{
save_s = s++;
+ /* 64 bit conditions. */
+ if (*args == 'X')
+ {
+ if (*s == '*')
+ s++;
+ else
+ break;
+ }
name = s;
+
while (*s != ',' && *s != ' ' && *s != '\t')
s += 1;
c = *s;
s = save_s;
continue;
}
- else
+ /* ",*" is a valid condition. */
+ else if (*args != 'X')
as_bad (_("Invalid Shift/Extract/Deposit Condition."));
*s = c;
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
/* Handle a unit instruction condition. */
- case 'u': /* unit */
+ case 'U':
+ case 'u':
cmpltr = 0;
flag = 0;
if (*s == ',')
{
s++;
+ /* 64 bit conditions. */
+ if (*args == 'U')
+ {
+ if (*s == '*')
+ s++;
+ else
+ break;
+ }
+
if (strncasecmp (s, "sbz", 3) == 0)
{
cmpltr = 2;
flag = 1;
s += 3;
}
- else
+ /* ",*" is a valid condition. */
+ else if (*args != 'U')
as_bad (_("Invalid Unit Instruction Condition."));
}
opcode |= cmpltr << 13;