From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15720 invoked by alias); 17 Oct 2005 01:25:32 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 15586 invoked by uid 22791); 17 Oct 2005 01:25:29 -0000 Received: from mail.renesas.com (HELO mail02.idc.renesas.com) (202.234.163.13) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 17 Oct 2005 01:25:29 +0000 Received: from mail02.idc.renesas.com ([127.0.0.1]) by mail02.idc.renesas.com. (SMSSMTP 4.1.9.35) with SMTP id M2005101710252519636 ; Mon, 17 Oct 2005 10:25:25 +0900 Received: (from root@localhost) by guardian04.idc.renesas.com with id j9H1PO5U023924; Mon, 17 Oct 2005 10:25:24 +0900 (JST) Received: from unknown [172.20.8.70] by guardian04.idc.renesas.com with SMTP id LAA23923 ; Mon, 17 Oct 2005 10:25:24 +0900 Received: from dnma02 (dnma02.rso.renesas.com [172.30.11.200]) by dnma01.rso.renesas.com (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0IOH00DFEDABBN@dnma01.rso.renesas.com>; Mon, 17 Oct 2005 10:25:23 +0900 (JST) Received: from renesas.com ([172.30.60.3]) by dnma02.rso.renesas.com (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0IOH00EK3DAAEJ@dnma02.rso.renesas.com>; Mon, 17 Oct 2005 10:25:23 +0900 (JST) Date: Mon, 17 Oct 2005 01:25:00 -0000 From: Kazuhiro Inaoka Subject: Re: [PATCH] m32r-*-as For a code depended for host word size. In-reply-to: To: Andreas Schwab , Nick Clifton Cc: binutils@sources.redhat.com, cgen@sources.redhat.com Message-id: <4352FC6C.3070703@renesas.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) References: <434F6596.404@renesas.com> X-SW-Source: 2005-q4/txt/msg00010.txt.bz2 Thanks Andreas, > ~0xffff is still 0xffff0000 for 32 bit ints and will be zero extended. > You probably want ~(bfd_vma)0xffff here. Alternatively you can use > > value = ((value & 0xffff) ^ 0x8000) - 0x8000. It's better code. Hi Nick, Should I make and send the patch again? Regards, Kazuhiro Inaoka Andreas Schwab wrote: >>2005-10-14 Kazuhiro Inaoka >> >> * cpu/m32r.opc (parse_slo16): Changed for a code depended >> for host word size. >>Index: m32r.opc >>=================================================================== >>RCS file: /cvs/src/src/cpu/m32r.opc,v >>retrieving revision 1.6 >>diff -u -p -r1.6 m32r.opc >>--- m32r.opc 1 Jul 2005 11:16:30 -0000 1.6 >>+++ m32r.opc 14 Oct 2005 07:33:21 -0000 >>@@ -182,7 +182,7 @@ parse_slo16 (CGEN_CPU_DESC cd, >> { >> value &= 0xffff; >> if (value & 0x8000) >>- value |= 0xffff0000; >>+ value |= ~0xffff; >> >> > >~0xffff is still 0xffff0000 for 32 bit ints and will be zero extended. >You probably want ~(bfd_vma)0xffff here. Alternatively you can use > > value = ((value & 0xffff) ^ 0x8000) - 0x8000. >