public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Cc: Nick Clifton <nickc@redhat.com>,
	binutils@sources.redhat.com, cgen@sources.redhat.com
Subject: Re: [PATCH] m32r-*-as  For a code depended for host word size.
Date: Fri, 14 Oct 2005 09:04:00 -0000	[thread overview]
Message-ID: <je4q7ko4g3.fsf@sykes.suse.de> (raw)
In-Reply-To: <434F6596.404@renesas.com> (Kazuhiro Inaoka's message of "Fri, 14 Oct 2005 17:00:22 +0900")

Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> writes:

> 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
>
>    * 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.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2005-10-14  9:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-14  8:05 Kazuhiro Inaoka
2005-10-14  8:35 ` Nick Clifton
2005-10-14  9:04 ` Andreas Schwab [this message]
2005-10-17  1:25   ` Kazuhiro Inaoka
2005-10-18  7:54     ` Nick Clifton
2005-10-18  9:15       ` Kazuhiro Inaoka
2005-10-19 14:45         ` Nick Clifton
2005-10-20  1:18           ` Kazuhiro Inaoka
2005-10-26  5:39 ` Kazuhiro Inaoka
2005-10-26  6:05   ` Alan Modra
2005-10-26  6:21     ` Kazuhiro Inaoka
2005-10-26  7:50       ` Alan Modra
2005-10-27  0:58         ` Kazuhiro Inaoka

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=je4q7ko4g3.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=binutils@sources.redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=inaoka.kazuhiro@renesas.com \
    --cc=nickc@redhat.com \
    /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).