public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Synthetic register related: maximum value of a modrm byte in i386
@ 2003-01-04 11:37 Robert Dewar
  2003-01-04 14:26 ` Andy Walker
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Dewar @ 2003-01-04 11:37 UTC (permalink / raw)
  To: gcc, ja_walker

> The next, and obvious, question is how negative can it be?

obvious indeed :-)

It is just normal twos complement notation, like any other integer on
the machine.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Synthetic register related: maximum value of a modrm byte in i386
  2003-01-04 11:37 Synthetic register related: maximum value of a modrm byte in i386 Robert Dewar
@ 2003-01-04 14:26 ` Andy Walker
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Walker @ 2003-01-04 14:26 UTC (permalink / raw)
  To: Robert Dewar, gcc

On Saturday 04 January 2003 05:37 am, Robert Dewar wrote:
> > The next, and obvious, question is how negative can it be?
>
> obvious indeed :-)
>
> It is just normal twos complement notation, like any other integer on
> the machine.

Thank you very much.

Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Synthetic register related: maximum value of a modrm byte in i386
@ 2003-01-04  6:53 Andy Walker
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Walker @ 2003-01-04  6:53 UTC (permalink / raw)
  To: gcc

After much thought and reflection, and re-reading the Intel x86 Instruction 
manual, I have changed my mind and decided to use the edp, or 
hard-frame-register as the base register for the Synthetic regs.  

Some modrm instructions on the x86 can use a single byte as the offset, and 
it may be negative.   In other words, the integer in the single byte is 
signed.

The next, and obvious, question is how negative can it be?

I presume that B'0000 0000' represents zero.
I presume that B'0111 1111' represents 127.
I presume that B'1000 0001' represents -127.
What does B'1000 0000' represent?
 -128, or +128 ?

My Fine Manual is not at all clear.

Andy 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-04 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-04 11:37 Synthetic register related: maximum value of a modrm byte in i386 Robert Dewar
2003-01-04 14:26 ` Andy Walker
  -- strict thread matches above, loose matches on Subject: below --
2003-01-04  6:53 Andy Walker

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