FPU stack and XMM registers in ddbg
Daniel Keep
daniel.keep.lists at gmail.com
Sat Apr 28 21:15:39 PDT 2007
Jascha Wetzel wrote:
> that's right. Ddbg doesn't support debugging non-D code, though.
> on the other hand SSE2 only means new registers on AMD cpus and 3dnow is
> just a reinterpretation of the mmx registers.
> i added all the interpretations of the XMM and MM registers but didn't
> bother to get the AMD specific SSE2 extensions.
>
> therefore it's going to be MMX, 3DNOW!, SSE and SSE2 intel.
> the switches will be cpu, fpu, mmx, sse.
> here is what the new full register dump looks like:
>
> EAX = 00000002 EBX = 00000004 ECX = 00000004 EDX = 0012ff20
> EDI = 00000001 ESI = 00000001 EBP = 0012ff30 ESP = 0012fedc
> EIP = 004020ea EFL = 00000302
> CS = 0000001b DS = 00000023 ES = 00000023 FS = 0000003b
> GS = 00000000 SS = 00000023
>
> FCW = 137f FSW = 2100 FTW = 00ff FOP = 0014
> IP = 00000000 CS = 0000 DP = 00000000 DS = 0000
> ST0 = 1.0300000000000000e+01
> ST1 = 3.8000000000000000e+00
> ST2 = 2.4000000000000000e+00
> ST3 = 5.6000000000000000e+00
> ST4 = 4.6891198690254339e-4932
> ST5 = 3.6451995318824746e-4951
> ST6 = 8.1918522314966046e+4456
> ST7 = 0.0000000000000000e+00
>
> MM0 = a4cccccccccccccd
> = [-1.07374e+08, -8.88178e-17]
> MM1 = f333333333333333
> = [4.17233e-08, -1.41977e+31]
> MM2 = 999999999999999a
> = [-1.58819e-23, -1.58819e-23]
> MM3 = b333333333333333
> = [4.17233e-08, -4.17233e-08]
> MM4 = b2857a24805b09dd
> = [-8.36057e-39, -1.55388e-08]
> MM5 = 0000000000000001
> = [1.4013e-45, 0]
> MM6 = badb0d00804fd645
> = [-7.33187e-39, -0.00167122]
> MM7 = 00000017e62a9390
> = [-2.01381e+23, 3.22299e-44]
>
> MXCSR = 00001f80
> XMM0 = 406d5224dd2f1aa0405edd2f1a9fbe77
> = [6.60686e-23, 3.48225, -7.88598e+17, 3.70814]
> = [123.456, 234.567]
> XMM1 = 406d5224dd2f1aa0405edd2f1a9fbe77
> = [6.60686e-23, 3.48225, -7.88598e+17, 3.70814]
> = [123.456, 234.567]
> XMM2 = 43e464fe43acd6c9436a912742f6e979
> = [123.456, 234.567, 345.678, 456.789]
> = [5.98235776617e+16, 1.17566315604e+19]
> XMM3 = 43e464fe43acd6c9436a912742f6e979
> = [123.456, 234.567, 345.678, 456.789]
> = [5.98235776617e+16, 1.17566315604e+19]
> XMM4 = 43e464fe43acd6c9436a912742f6e979
> = [123.456, 234.567, 345.678, 456.789]
> = [5.98235776617e+16, 1.17566315604e+19]
> XMM5 = 43e464fe43acd6c9436a912742f6e979
> = [123.456, 234.567, 345.678, 456.789]
> = [5.98235776617e+16, 1.17566315604e+19]
> XMM6 = 43e464fe43acd6c9436a912742f6e979
> = [123.456, 234.567, 345.678, 456.789]
> = [5.98235776617e+16, 1.17566315604e+19]
> XMM7 = 43e464fe43acd6c9436a912742f6e979
> = [123.456, 234.567, 345.678, 456.789]
> = [5.98235776617e+16, 1.17566315604e+19]
>
> Frits van Bommel wrote:
>> Jascha Wetzel wrote:
>>> oh ok, forget SSE2 and 3DNOW! - makes little sense as long D inline asm
>>> doesn't support them...
>> That doesn't mean they won't be used in (mostly-)D programs. You can
>> still use a separate assembler and link the output in.
>>
>> (And for the really perverse, db and friends can emit any code you like
>> from within the inline assembler :P)
Many thanks for this. The only thing is that the MM and XMM registers
can store quite a few different types. For instance, IIRC, all the
original MMX instructions dealt with integers, whilst 3DNow! added
floats. SSE2 also adds integer types for the XMM registers, so being
able to say "dump the XMM registers as, oh let's call them uint's" would
be handy :)
Other than that, looks perfect :)
-- Daniel
--
int getRandomNumber()
{
return 4; // chosen by fair dice roll.
// guaranteed to be random.
}
http://xkcd.com/
v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
More information about the Digitalmars-d-debugger
mailing list