summaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2013-08-06 19:27:06 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2013-08-06 19:27:06 +0000
commitac9ab37463a327a97b696c8576bf3eb1054107b1 (patch)
tree836c2df71e961b8982d0956f48a6034a772633e8 /gas/config
parenta59988ec3102e59cd09343a2a86ce867e8d80c71 (diff)
downloadbinutils-redhat-ac9ab37463a327a97b696c8576bf3eb1054107b1.tar.gz
opcodes/
2013-08-06 Jürgen Urban <JuergenUrban@gmx.de> * mips-opc.c (mips_builtin_opcodes): Add a suffixless version of VCLIPW. gas/ 2013-08-06 Jürgen Urban <JuergenUrban@gmx.de> * config/tc-mips.c (match_vu0_suffix_operand): Allow single-channel suffixes to be elided too. (mips_lookup_insn): Don't reject INSN2_VU0_CHANNEL_SUFFIX here. (mips_ip): Assume .xyzw if no VU0 suffix is specified. Allow +N to be omitted too. gas/testsuite/ 2013-08-06 Jürgen Urban <JuergenUrban@gmx.de> * gas/mips/r5900-error-vu0.s, gas/mips/r5900-error-vu0.l, gas/mips/r5900-full-vu0.s, gas/mips/r5900-full-vu0.d: Allow single-channel suffixes to be elided.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mips.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 1c79634bb8..f35dbe0784 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -5242,9 +5242,9 @@ match_vu0_suffix_operand (struct mips_arg_info *arg,
(with X being 0). */
gas_assert (operand->size == 2 || operand->size == 4);
- /* The suffix can be omitted when matching a previous 4-bit mask. */
+ /* The suffix can be omitted when it is already part of the opcode. */
if (arg->token->type != OT_CHANNELS)
- return operand->size == 4 && match_p;
+ return match_p;
uval = arg->token->u.channels;
if (operand->size == 2)
@@ -12321,7 +12321,7 @@ mips_lookup_insn (struct hash_control *hash, const char *start,
/* Look up the instruction as-is. */
insn = (struct mips_opcode *) hash_find (hash, name);
- if (insn && (insn->pinfo2 & INSN2_VU0_CHANNEL_SUFFIX) == 0)
+ if (insn)
return insn;
dot = strchr (name, '.');
@@ -12359,7 +12359,7 @@ mips_lookup_insn (struct hash_control *hash, const char *start,
{
memcpy (name + opend - 2, name + opend, length - opend + 1);
insn = (struct mips_opcode *) hash_find (hash, name);
- if (insn && (insn->pinfo2 & INSN2_VU0_CHANNEL_SUFFIX) == 0)
+ if (insn)
{
forced_insn_length = suffix;
return insn;
@@ -12422,6 +12422,9 @@ mips_ip (char *str, struct mips_cl_insn *ip)
insn_error = _("Unrecognized opcode");
return;
}
+ /* When no opcode suffix is specified, assume ".xyzw". */
+ if ((insn->pinfo2 & INSN2_VU0_CHANNEL_SUFFIX) != 0 && opcode_extra == 0)
+ opcode_extra = 0xf << mips_vu0_channel_mask.lsb;
if (strcmp (insn->name, "li.s") == 0)
format = 'f';
@@ -12535,8 +12538,15 @@ mips_ip (char *str, struct mips_cl_insn *ip)
if (strcmp (args, "(b)") == 0)
args += 3;
- if (args[0] == '+' && args[1] == 'K')
- args += 2;
+ if (args[0] == '+')
+ switch (args[1])
+ {
+ case 'K':
+ case 'N':
+ /* The register suffix is optional. */
+ args += 2;
+ break;
+ }
/* Fail the match if there were too few operands. */
if (*args)