This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] CR16 target specific fix
- From: "M R Swami Reddy" <MR dot Swami dot Reddy at nsc dot com>
- To: "Nick Clifton" <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 21 May 2008 13:05:43 +0530
- Subject: Re: [PATCH] CR16 target specific fix
- References: <4832B7F6.4040902@nsc.com> <4832F461.1010009@redhat.com>
Hi Nick,
Thank you very much for review and suggestion.
Please find the updated the patch as per your comment.
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 21 May 2008 07:23:57 -0000
***************
*** 307,312 ****
--- 307,316 ----
build_mask (void)
{
unsigned long mask = SBM (instruction->match_bits);
+ /* Adjust mask for bcond with 32-bit size instruction. */
+ if ((IS_INSN_MNEMONIC("b") && instruction->size == 2))
+ mask = 0xff0f0000;
+
return mask;
}
=====================================================================
Nick Clifton wrote:
Hi Swami,
{
mask = build_mask ();
+ /* Adjust mask for bcond with 32-bit size instruction. */
+ if ((IS_INSN_MNEMONIC("b") && instruction->size == 2))
+ mask = 0xff0f0000;
+
Wouldn't it be better cleaner if this code was inside build_mask() ?
Cheers
Nick