From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2636 invoked by alias); 22 May 2006 08:39:58 -0000 Received: (qmail 2628 invoked by uid 22791); 22 May 2006 08:39:56 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 22 May 2006 08:39:54 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4M8dq52022592 for ; Mon, 22 May 2006 04:39:52 -0400 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4M8dpVx008322 for ; Mon, 22 May 2006 04:39:52 -0400 Received: from localhost.localdomain.redhat.com (vpn-68-6.surrey.redhat.com [10.32.68.6]) by pobox.surrey.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4M8do9w025782 for ; Mon, 22 May 2006 09:39:50 +0100 To: binutils@sourceware.org Subject: Fix CRX disassembler for 64bit hosts From: Nick Clifton Date: Mon, 22 May 2006 11:44:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00372.txt.bz2 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 * 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'. */