This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] mips: Fix "info registers" output
> On Sun, Mar 10, 2002 at 11:30:09AM -0500, Andrew Cagney wrote:
>> Suggest a FIXME and bug report here. It isn't safe to assume things
>> like builtin_type_double is 64 bit. The code should use the ABI
>> independant builtin_type_ieee_BLAH. But this is a separate bug and not
>> your problem :-)
>
>
> builtin_type_double =
> init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
> 0,
> "double", (struct objfile *) NULL);
>
>
> set_gdbarch_double_bit (gdbarch, 64);
>
>
> Why isn't it safe to assume that a double is 64-bit when we explicitly
> set it that way? I assume that the builtin types get swapped out when
> we change gdbarch... yes, they do. Besides, is MIPS FP actually IEEE?
> Oh, I suppose the values probably are and only some of the math isn't.
Have a look at GCC's -fshort-double option. I'm not sure how MIPS would
respond to it but I suspect it would make everyones head hurt. :-)
The ``info registers'' code is both ISA and ABI dependant. ISA since
that determines the raw format of registers (ieee_double_{big,little}
not double) - the ABI shouldn't change a MIPS DOUBLE. ABI since that
determins where bits of registers end up being saved on the stack.
> Committed without that last FIXME; I'll add it if it's really
> necessary
Er, where's the fire? With all respect, it is always better to give the
other party the chance to respond.
Andrew