diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-08-06 19:27:07 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-08-06 19:27:07 +0000 |
commit | ee5734f078f7f09cf57d8e77bc85ffe20891c3b6 (patch) | |
tree | e6a9c4de66bd6584aa0a044460fc7fe9c6a2fc5f /gas | |
parent | fdd57b168c4866442d6779e80ef0b9f6f853465f (diff) | |
download | gdb-ee5734f078f7f09cf57d8e77bc85ffe20891c3b6.zip gdb-ee5734f078f7f09cf57d8e77bc85ffe20891c3b6.tar.gz gdb-ee5734f078f7f09cf57d8e77bc85ffe20891c3b6.tar.bz2 |
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')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 22 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/r5900-error-vu0.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/r5900-error-vu0.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/r5900-full-vu0.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/r5900-full-vu0.s | 7 |
7 files changed, 41 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index b8407b5..d51874f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +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. + 2013-08-05 John Tytgat <john@bass-software.com> * po/POTFILES.in: Regenerate. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 1c79634..f35dbe0 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) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 39c067d..4c17de5 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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. + 2013-08-04 Jürgen Urban <JuergenUrban@gmx.de> * gas/mips/r5900-vu0.d: Expect $vfN and $viN instead of numeric diff --git a/gas/testsuite/gas/mips/r5900-error-vu0.l b/gas/testsuite/gas/mips/r5900-error-vu0.l index 9bf7077..d012caa 100644 --- a/gas/testsuite/gas/mips/r5900-error-vu0.l +++ b/gas/testsuite/gas/mips/r5900-error-vu0.l @@ -71,7 +71,6 @@ .*: Error: Illegal operands `vaddaz\.xy \$ACCxyz,\$vf0xy,\$vf31z' .*: Error: Illegal operands `vaddaz\.y \$ACCx,\$vf31y,\$vf0z' .*: Error: Illegal operands `vaddaz\.yw \$ACCyw,\$vf0yw,\$a0' -.*: Error: Illegal operands `vaddaz\.yw \$ACC,\$0,\$31' .*: Error: Illegal operands `vaddi\.w \$vf0w,\$vf31w,\$Q' .*: Error: Illegal operands `vaddi\.w \$vf1w,\$vf2w,\$R' .*: Error: Illegal operands `vaddi\.w \$vf31w,\$vf0w,\$ACC' @@ -637,7 +636,6 @@ .*: Error: Illegal operands `vsubax\.w \$ACCx,\$vf31x,\$vf0x' .*: Error: Illegal operands `vsubax\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf0xyzw' .*: Error: Illegal operands `vsubax\.xzw \$ACCxzw,\$vf1xzw,\$vf2xzw' -.*: Error: Illegal operands `vsubax\.y \$ACCy,\$vf1y,\$vf2' .*: Error: Illegal operands `vsubax\.y \$ACCy,\$vf31y,\$vf0y' .*: Error: Illegal operands `vsubax\.yw \$ACCyw,\$vf0yw,\$vf0yw' .*: Error: Illegal operands `vsubay\.yw \$ACCyw,\$vf0yw,\$vf31yw' diff --git a/gas/testsuite/gas/mips/r5900-error-vu0.s b/gas/testsuite/gas/mips/r5900-error-vu0.s index 7840e03..9f50206 100644 --- a/gas/testsuite/gas/mips/r5900-error-vu0.s +++ b/gas/testsuite/gas/mips/r5900-error-vu0.s @@ -77,7 +77,6 @@ text_label: vaddaz.xy $ACCxyz, $vf0xy, $vf31z vaddaz.y $ACCx, $vf31y, $vf0z vaddaz.yw $ACCyw, $vf0yw, $a0 - vaddaz.yw $ACC, $0, $31 vaddi.w $vf0w, $vf31w, $Q vaddi.w $vf1w, $vf2w, $R vaddi.w $vf31w, $vf0w, $ACC @@ -641,7 +640,6 @@ text_label: vsubax.w $ACCx, $vf31x, $vf0x vsubax.xyzw $ACCxyzw, $vf31xyzw, $vf0xyzw vsubax.xzw $ACCxzw, $vf1xzw, $vf2xzw - vsubax.y $ACCy, $vf1y, $vf2 vsubax.y $ACCy, $vf31y, $vf0y vsubax.yw $ACCyw, $vf0yw, $vf0yw vsubay.yw $ACCyw, $vf0yw, $vf31yw diff --git a/gas/testsuite/gas/mips/r5900-full-vu0.d b/gas/testsuite/gas/mips/r5900-full-vu0.d index be0bf5b..8db6949 100644 --- a/gas/testsuite/gas/mips/r5900-full-vu0.d +++ b/gas/testsuite/gas/mips/r5900-full-vu0.d @@ -25,6 +25,7 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> 4a007ff8 vcallms 0xff8 [0-9a-f]+ <[^>]*> 4a00d839 vcallmsr \$vi27 [0-9a-f]+ <[^>]*> 4bc1f9ff vclipw\.xyz \$vf31xyz,\$vf1w +[0-9a-f]+ <[^>]*> 4bc1f9ff vclipw\.xyz \$vf31xyz,\$vf1w [0-9a-f]+ <[^>]*> 4a2b0bbc vdiv \$Q,\$vf1y,\$vf11x [0-9a-f]+ <[^>]*> 4be0f97c vftoi0\.xyzw \$vf0xyzw,\$vf31xyzw [0-9a-f]+ <[^>]*> 4be0f97d vftoi4\.xyzw \$vf0xyzw,\$vf31xyzw @@ -56,12 +57,15 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> 4be1fa88 vmaddx\.xyzw \$vf10xyzw,\$vf31xyzw,\$vf1x [0-9a-f]+ <[^>]*> 4be1fa89 vmaddy\.xyzw \$vf10xyzw,\$vf31xyzw,\$vf1y [0-9a-f]+ <[^>]*> 4be1fa8a vmaddz\.xyzw \$vf10xyzw,\$vf31xyzw,\$vf1z +[0-9a-f]+ <[^>]*> 4be5198a vmaddz\.xyzw \$vf6xyzw,\$vf3xyzw,\$vf5z [0-9a-f]+ <[^>]*> 4be0fabd vmadda\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf0xyzw [0-9a-f]+ <[^>]*> 4be0fa3f vmaddai\.xyzw \$ACCxyzw,\$vf31xyzw,\$I [0-9a-f]+ <[^>]*> 4be0fa3d vmaddaq\.xyzw \$ACCxyzw,\$vf31xyzw,\$Q [0-9a-f]+ <[^>]*> 4be1f8bf vmaddaw\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1w [0-9a-f]+ <[^>]*> 4be1f8bc vmaddax\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1x +[0-9a-f]+ <[^>]*> 4be508bc vmaddax\.xyzw \$ACCxyzw,\$vf1xyzw,\$vf5x [0-9a-f]+ <[^>]*> 4be1f8bd vmadday\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1y +[0-9a-f]+ <[^>]*> 4be510bd vmadday\.xyzw \$ACCxyzw,\$vf2xyzw,\$vf5y [0-9a-f]+ <[^>]*> 4be1f8be vmaddaz\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1z [0-9a-f]+ <[^>]*> 4be0faab vmax\.xyzw \$vf10xyzw,\$vf31xyzw,\$vf0xyzw [0-9a-f]+ <[^>]*> 4be0fa9d vmaxi\.xyzw \$vf10xyzw,\$vf31xyzw,\$I @@ -104,6 +108,7 @@ Disassembly of section \.text: [0-9a-f]+ <[^>]*> 4be0f9fe vmulai\.xyzw \$ACCxyzw,\$vf31xyzw,\$I [0-9a-f]+ <[^>]*> 4be0f9fc vmulaq\.xyzw \$ACCxyzw,\$vf31xyzw,\$Q [0-9a-f]+ <[^>]*> 4be1f9bf vmulaw\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1w +[0-9a-f]+ <[^>]*> 4be021bf vmulaw\.xyzw \$ACCxyzw,\$vf4xyzw,\$vf0w [0-9a-f]+ <[^>]*> 4be1f9bc vmulax\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1x [0-9a-f]+ <[^>]*> 4be1f9bd vmulay\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1y [0-9a-f]+ <[^>]*> 4be1f9be vmulaz\.xyzw \$ACCxyzw,\$vf31xyzw,\$vf1z diff --git a/gas/testsuite/gas/mips/r5900-full-vu0.s b/gas/testsuite/gas/mips/r5900-full-vu0.s index a26235b..cd028cb 100644 --- a/gas/testsuite/gas/mips/r5900-full-vu0.s +++ b/gas/testsuite/gas/mips/r5900-full-vu0.s @@ -25,7 +25,8 @@ text_label: vcallms 0xff8 vcallmsr $vi27 vclipw.xyz $vf31xyz,$vf1w - vdiv $Q,$vf1y,$vf11x + vclipw $vf31xyz,$vf1w + vdiv $Q,$vf1y,$vf11x vftoi0.xyzw $vf0xyzw,$vf31xyzw vftoi4.xyzw $vf0xyzw,$vf31xyzw vftoi12.xyzw $vf0xyzw,$vf31xyzw @@ -56,12 +57,15 @@ text_label: vmaddx.xyzw $vf10xyzw,$vf31xyzw,$vf1x vmaddy.xyzw $vf10xyzw,$vf31xyzw,$vf1y vmaddz.xyzw $vf10xyzw,$vf31xyzw,$vf1z + vmaddz $vf6, $vf3, $vf5 vmadda.xyzw $ACCxyzw,$vf31xyzw,$vf0xyzw vmaddai.xyzw $ACCxyzw,$vf31xyzw,$I vmaddaq.xyzw $ACCxyzw,$vf31xyzw,$Q vmaddaw.xyzw $ACCxyzw,$vf31xyzw,$vf1w vmaddax.xyzw $ACCxyzw,$vf31xyzw,$vf1x + vmaddax $ACC, $vf1, $vf5 vmadday.xyzw $ACCxyzw,$vf31xyzw,$vf1y + vmadday $ACC, $vf2, $vf5 vmaddaz.xyzw $ACCxyzw,$vf31xyzw,$vf1z vmax.xyzw $vf10xyzw,$vf31xyzw,$vf0xyzw vmaxi.xyzw $vf10xyzw,$vf31xyzw,$I @@ -104,6 +108,7 @@ text_label: vmulai.xyzw $ACCxyzw,$vf31xyzw,$I vmulaq.xyzw $ACCxyzw,$vf31xyzw,$Q vmulaw.xyzw $ACCxyzw,$vf31xyzw,$vf1w + vmulaw $ACC, $vf4, $vf0 vmulax.xyzw $ACCxyzw,$vf31xyzw,$vf1x vmulay.xyzw $ACCxyzw,$vf31xyzw,$vf1y vmulaz.xyzw $ACCxyzw,$vf31xyzw,$vf1z |