public inbox for
 help / color / mirror / Atom feed
From: Ian Lance Taylor <>
Subject: Re: ppc instructions in gas
Date: Thu, 06 May 1999 20:06:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

   Date: Thu, 6 May 1999 15:07:24 -0700
   From: Richard Henderson <>

   On Wed, May 05, 1999 at 04:52:32PM -0600, Cort Dougan wrote:
   > The signed change at the top makes sense with what the manual says.  The
   > operand in questions should be a 16-bit unsigned immediate value not signed
   > (as it was before).
   >    /* The SI field in a D form instruction when we accept a wide range
   >       of positive values.  */
   >  #define SISIGNOPT SI + 1
   > -  { 16, 0, 0, 0, PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
   > +  { 16, 0, 0, 0, /*PPC_OPERAND_SIGNED |*/ PPC_OPERAND_SIGNOPT },

   Looking at this again, I wonder if this change is correct.

   Which instruction were you trying to fix?  "liu" perhaps? 
   As-is, it affects instructions like "addis", and you can't
   really add +50000, can you?

We specifically want to accept a wide range of values, because users
in practice use a wide range of values.  That is, users in practice
    lis  4,-0x8000
    lis  4,0x7fff
    lis  4,0xffff
    lis  4,-1
and expect them all to work.  It's true that the PowerPC docs prohibit
the last one.  However, people use it in real code, so gas accepts
it.  The last two instructions above generate the same bytes.

I don't have the context of the original message.  The addis/lis
instruction is documented to take a signed operand.  I don't know why
it makes sense to remove PPC_OPERAND_SIGNED.


  parent reply	other threads:[~1999-05-06 20:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
     [not found] ` <>
     [not found]   ` <>
1999-05-06 15:07     ` Richard Henderson
     [not found]       ` <>
1999-05-06 15:35         ` Richard Henderson
     [not found]           ` <>
1999-05-06 16:56             ` Richard Henderson
     [not found]               ` <>
1999-05-06 17:49                 ` Richard Henderson
     [not found]                   ` <>
1999-05-06 18:43                     ` Richard Henderson
1999-05-06 20:06       ` Ian Lance Taylor [this message]
1999-05-06 20:13         ` Richard Henderson
1999-05-06 20:43           ` Ian Lance Taylor

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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).