This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: x86 FPU support: "info float" and `long double'


> 
> > My current gdb has
> > 
> > (gdb) info float
> >      st0: 0x3ffed6d6d6d6d6d6d800  Empty Normal 0.8392156862745098200307
> >      st1: 0x00000000000000000000  Empty Zero   0
> 
> "st0", "st1" etc. implies stack-relative order of the registers.
> IMHO, this is wrong: it doesn't present the registers as a stack, and
> with each push/pop operation, the entire picture moves up/down, which
> is very confusing.  If this format is adopted (I hope not), it won't
> make sense to print the TOS pointer (that arrow => shown by Mark in
> his example), since the TOS is always st0.
> 
> In the physical order, like what go32-nat.c does, the registers cannot
> be designated st0, st1, etc., because that's not true.  If 0, 1,
> etc. is somehow not good enough, we should use R0, R1, etc., like
> Intel does.
> 

That is a good point. I am used to check

fstat:     0x0000 flags 0000; top 0;

for where the real st0 is.


-- 
H.J. Lu (hjl@gnu.org)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]