Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Guillaume POIRIER <poirierg@gmail.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Setting an SSE register to a certain value
Date: Sat, 31 Dec 2005 05:41:00 -0000	[thread overview]
Message-ID: <ud5jht27n.fsf@gnu.org> (raw)
In-Reply-To: <4e03026a0512280015m39499343rf96f8075fad23eeb@mail.gmail.com> 	(message from Guillaume POIRIER on Wed, 28 Dec 2005 09:15:45 +0100)

> Date: Wed, 28 Dec 2005 09:15:45 +0100
> From: Guillaume POIRIER <poirierg@gmail.com>
> 
> > That is, try this:
> >
> >   set $xmm2.uint128 = 0x000000000000000000000000FFFFFFFF
> 
> Thanks you so much! That worked beautifully. I hope this information
> can be added to your documentation as this will probably come in handy
> to other people, don't you think? :-)

Yes, I've just added the following to the manual:

2005-12-28  Eli Zaretskii  <eliz@gnu.org>

	* gdb.texinfo (Registers): Describe how to refer to SSE and MMX
	registers and the likes.


Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.302
diff -u -r1.302 gdb.texinfo
--- gdb/doc/gdb.texinfo	24 Dec 2005 15:28:44 -0000	1.302
+++ gdb/doc/gdb.texinfo	28 Dec 2005 20:04:30 -0000
@@ -6279,6 +6279,36 @@
 that makes sense for your program), but the @code{info registers} command
 prints the data in both formats.
 
+@cindex SSE registers (x86)
+@cindex MMX registers (x86)
+Some machines have special registers whose contents can be interpreted
+in several different ways.  For example, modern x86-based machines
+have SSE and MMX registers that can hold several values packed
+together in several different formats.  @value{GDBN} refers to such
+registers in @code{struct} notation:
+
+@smallexample
+(@value{GDBP}) print $xmm1
+$1 = @{
+  v4_float = @{0, 3.43859137e-038, 1.54142831e-044, 1.821688e-044@},
+  v2_double = @{9.92129282474342e-303, 2.7585945287983262e-313@},
+  v16_int8 = "\000\000\000\000\3706;\001\v\000\000\000\r\000\000",
+  v8_int16 = @{0, 0, 14072, 315, 11, 0, 13, 0@},
+  v4_int32 = @{0, 20657912, 11, 13@},
+  v2_int64 = @{88725056443645952, 55834574859@},
+  uint128 = 0x0000000d0000000b013b36f800000000
+@}
+@end smallexample
+
+@noindent
+To set values of such registers, you need to tell @value{GDBN} which
+view of the register you wish to change, as if you were assigning
+value to a @code{struct} member:
+
+@smallexample
+ (@value{GDBP}) set $xmm1.uint128 = 0x000000000000000000000000FFFFFFFF
+@end smallexample
+
 Normally, register values are relative to the selected stack frame
 (@pxref{Selection, ,Selecting a frame}).  This means that you get the
 value that the register would contain if all stack frames farther in


           reply	other threads:[~2005-12-28 20:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4e03026a0512280015m39499343rf96f8075fad23eeb@mail.gmail.com>]

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=ud5jht27n.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=poirierg@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