From: Mark Kettenis <kettenis@chello.nl>
To: Andrew Cagney <ac131313@ges.redhat.com>
Cc: Jim Blandy <jimb@redhat.com>, gdb@sources.redhat.com
Subject: Re: WIP: Register doco
Date: Mon, 22 Jul 2002 14:39:00 -0000 [thread overview]
Message-ID: <867kjnv3x7.fsf@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: Andrew Cagney's message of "Sat, 20 Jul 2002 16:40:49 -0400"
Andrew Cagney <ac131313@ges.redhat.com> writes:
> > The example of the IA-32's MMX and FP registers is a great example for
> > this. The MMX registers, MM0--MM7, and the FP registers,
> > ST(0)--ST(7), actually refer to the same set of eight eighty-bit
> > registers, R0--R7. A reference to the floating-point register ST(i)
> > becomes a reference to R((TOP + i) % 8), where TOP is a three-bit
> > field in the FPU status register. But a reference to the MMX register
> > MM(i) becomes a reference to the lower 64 bits of R(i) (which would be
> > the mantissa of some ST(i)).
>
> (In the current code, ST(I) and not R(I) is stored, so we end up with
> MM(I) == regcache(FP0 + (TOP + 1) % 8) :-( I'm almost ready to dust
> off the patch that does this.)
Oh dear, another confusing discussion about the IA-32's FP registers.
While the Intel manuals talk about the registers R0--R7, the ISA
doesn't really expose these. Both the old fsave and the new fxsave
instructions store ST(I) and not R(I). Until the introduction of the
Pentium MMX processor the R0--R7 registers really can be considered an
implementation detail, and the fact that the MMX instructions set TOP
to zero makes sure that as far as the MMX registers are concerned,
there still is something like an identity mapping between ST(I) and
R(I).
In other words, I consider the fact that GDB stores ST(I) and not
R(I), the right approach.
Mark
next prev parent reply other threads:[~2002-07-22 21:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-19 17:31 Andrew Cagney
2002-07-19 20:11 ` Jim Blandy
2002-07-20 11:39 ` Andrew Cagney
2002-07-20 11:36 ` Jim Blandy
2002-07-20 13:41 ` Andrew Cagney
2002-07-20 15:26 ` Jim Blandy
2002-07-21 9:41 ` Andrew Cagney
2002-07-21 10:04 ` Daniel Jacobowitz
2002-07-22 9:38 ` Andrew Cagney
2002-07-22 10:30 ` Daniel Jacobowitz
2002-07-23 16:25 ` Jim Blandy
2002-07-23 17:34 ` Andrew Cagney
2002-07-23 20:45 ` Jim Blandy
2002-07-24 8:35 ` Andrew Cagney
2002-07-24 22:08 ` Jim Blandy
2002-07-25 8:13 ` Andrew Cagney
2002-07-23 21:17 ` Jim Blandy
2002-07-24 9:09 ` Andrew Cagney
2002-07-24 22:03 ` Jim Blandy
2002-07-25 8:11 ` Andrew Cagney
2002-07-22 14:39 ` Mark Kettenis [this message]
2002-07-22 14:41 ` Mark Kettenis
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=867kjnv3x7.fsf@elgar.kettenis.dyndns.org \
--to=kettenis@chello.nl \
--cc=ac131313@ges.redhat.com \
--cc=gdb@sources.redhat.com \
--cc=jimb@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