This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] CR16 target specific fix
- From: "M R Swami Reddy" <MR dot Swami dot Reddy at nsc dot com>
- To: binutils at sourceware dot org
- Date: Tue, 20 May 2008 17:07:26 +0530
- Subject: [PATCH] CR16 target specific fix
Hello,
Patch to fix the cr16 target opcodes disassembly of 2-word b<cc> instructions.
Could you please review and approve the same.
Thanks,
Swami
===================================================================
RCS file: /cvs/src/src/opcodes/cr16-dis.c,v
retrieving revision 1.3
diff -c -r1.3 cr16-dis.c
*** cr16-dis.c 5 Jul 2007 09:49:00 -0000 1.3
--- cr16-dis.c 20 May 2008 11:21:39 -0000
***************
*** 326,331 ****
--- 326,335 ----
while (instruction >= cr16_instruction)
{
mask = build_mask ();
+ /* Adjust mask for bcond with 32-bit size instruction. */
+ if ((IS_INSN_MNEMONIC("b") && instruction->size == 2))
+ mask = 0xff0f0000;
+
if ((doubleWord & mask) == BIN (instruction->match,
instruction->match_bits))
return 1;
====