From 5d4c71e1273480dd7ced19e193649093b30f1bd1 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Thu, 7 Oct 2010 11:28:49 +0000 Subject: 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. --- opcodes/tic6x-dis.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'opcodes/tic6x-dis.c') 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 { -- cgit v1.1