aboutsummaryrefslogtreecommitdiff
path: root/opcodes/tic6x-dis.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2010-10-07 11:28:49 +0000
committerBernd Schmidt <bernds@codesourcery.com>2010-10-07 11:28:49 +0000
commit5d4c71e1273480dd7ced19e193649093b30f1bd1 (patch)
tree80f87c5301c440a4a86b344c4475c2469a0ab2e1 /opcodes/tic6x-dis.c
parent1d2a4540a591685f1d4a126ea54b5b62478de1b5 (diff)
downloadgdb-5d4c71e1273480dd7ced19e193649093b30f1bd1.zip
gdb-5d4c71e1273480dd7ced19e193649093b30f1bd1.tar.gz
gdb-5d4c71e1273480dd7ced19e193649093b30f1bd1.tar.bz2
gas/
* config/tc-tic6x.c (tic6x_try_encode): Correct encoding of fstg field in SPKERNEL instructions. opcodes/ * tic6x-dis.c (print_insn_tic6x): Correct decoding of fstg field in SPKERNEL instructions. gas/testsuite/ * gas/tic6x/insns-c674x-sploop.d: Add two more sploop/spkernel tests. * gas/tic6x/insns-c674x-sploop.s: Likewise.
Diffstat (limited to 'opcodes/tic6x-dis.c')
-rw-r--r--opcodes/tic6x-dis.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/opcodes/tic6x-dis.c b/opcodes/tic6x-dis.c
index 8032084..86505ac 100644
--- a/opcodes/tic6x-dis.c
+++ b/opcodes/tic6x-dis.c
@@ -882,9 +882,11 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
abort ();
if (enc->coding_method == tic6x_coding_fstg)
{
+ int i, t;
+ for (t = 0, i = fcyc_bits; i < 6; i++)
+ t = (t << 1) | ((fld_val >> i) & 1);
operands_text[op_num] = TRUE;
- snprintf (operands[op_num], 24, "%u",
- fld_val >> fcyc_bits);
+ snprintf (operands[op_num], 24, "%u", t);
}
else
{