public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Mohamed Shafi <shafitvm@gmail.com>
Cc: GCC <gcc@gcc.gnu.org>
Subject: Re: Need help in deciding the instruction set for a new target.
Date: Mon, 23 Aug 2010 22:20:00 -0000	[thread overview]
Message-ID: <4C72D909.9030204@redhat.com> (raw)
In-Reply-To: <AANLkTimKoa7xNV4dgqQdysJGB6bc2_O7bQrKruiMXhEL@mail.gmail.com>

On 08/23/2010 11:05 AM, Mohamed Shafi wrote:
> sub.s32 srcdstGP, #imm16 // signed 16-bit register to immediate subtract
> sub.u32 srcdstGP, #imm16 // unsigned 16-bit register to immediate subtract

Having both of these is probably not useful.  Bernd pointed
out that a 17-bit constant would be more useful.  I'll point
out that if you have a signed constant then SUB and ADD tend
to be essentially identical as well.

Consider implementing "reverse subtract"

	RSUB reg, #imm
as
	reg = imm - reg

instead.


r~

      parent reply	other threads:[~2010-08-23 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 18:25 Mohamed Shafi
2010-08-23 19:00 ` Ian Lance Taylor
2010-08-23 20:24 ` Bernd Schmidt
2010-08-23 22:20 ` Richard Henderson [this message]

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=4C72D909.9030204@redhat.com \
    --to=rth@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=shafitvm@gmail.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).