From: Nick Clifton <nickc@redhat.com>
To: binutils@sourceware.org
Subject: Fix CRX disassembler for 64bit hosts
Date: Mon, 22 May 2006 11:44:00 -0000 [thread overview]
Message-ID: <m3odxqwizt.fsf@redhat.com> (raw)
Hi Guys,
I am going to check in the patch below to fix a small problem with
the disassembler for the CRX target when it is running on a 64-bit
host. The EXTRACT macro was assuming that ~0L was the equivalent of
a number with 32 bits set in it, when of course this does not have
to be the case.
Discovered whilst examining crx-elf linker test results, and tested
the same way - it eliminates two unexpected failures.
Cheers
Nick
opcodes/ChangeLog
2006-05-22 Nick Clifton <nickc@redhat.com>
* crx-dis.c (EXTRACT): Make macro work on 64-bit hosts.
Index: opcodes/crx-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/crx-dis.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 crx-dis.c
*** opcodes/crx-dis.c 7 Jul 2005 19:27:48 -0000 1.11
--- opcodes/crx-dis.c 22 May 2006 08:36:05 -0000
***************
*** 30,36 ****
/* Extract 'n_bits' from 'a' starting from offset 'offs'. */
#define EXTRACT(a, offs, n_bits) \
! (n_bits == 32 ? (((a) >> (offs)) & ~0L) \
: (((a) >> (offs)) & ((1 << (n_bits)) -1)))
/* Set Bit Mask - a mask to set all bits starting from offset 'offs'. */
--- 30,36 ----
/* Extract 'n_bits' from 'a' starting from offset 'offs'. */
#define EXTRACT(a, offs, n_bits) \
! (n_bits == 32 ? (((a) >> (offs)) & 0xffffffffL) \
: (((a) >> (offs)) & ((1 << (n_bits)) -1)))
/* Set Bit Mask - a mask to set all bits starting from offset 'offs'. */
reply other threads:[~2006-05-22 8:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3odxqwizt.fsf@redhat.com \
--to=nickc@redhat.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).