From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Don Howard Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [RFA] mips fp register display Date: Sat, 23 Jun 2001 11:03:00 -0000 Message-id: <3B34D9D4.3000500@cygnus.com> References: X-SW-Source: 2001-06/msg00385.html >> >> On the other hand, I think that perhaps if FR is set >> REGISTER_RAW_SIZE (regnum) ought to be 4. Isn't that what it means? > > It seems to me that REGISTER_VIRTUAL_SIZE() is the macro that should provide > this info, as the raw register doesn't change. Neither of these check the FR > bit. FYI, REGISTER_RAW_SIZE() returns the number of bytes used to store the targets _raw_ register. When a MIPS3/4/5 is executing MIPS2 code, the raw FP register still contains 64 bits. It is just that only the low 32 bits is being used. This is very like a 64 bit MIPS cpu running a 32 bit program. This typically only occures in embedded environments. With regard to REGISTER_RAW_SIZE and REGISTER_CONVERT_TO_TYPE. They are about to be deprecated .... (see TODO). The methods gdbarch_register_{read,write} were recently added and they really clean up that mess. I wouldn't be too worried about using them here. Andrew >> Also, we already have REGISTER_CONVERT_TO_TYPE. Rather than hacking in >> a third or perhaps fourth copy of this sort of thing, why not extend >> REGISTER_CONVERT_TO_TYPE? > > > I would guess (I'm no authority though) that REGISTER_CONVERT_TO_VIRTUAL() and > REGISTER_CONVERT_TO_RAW() might be better places to do this. > > I chose to implement a new read_fp_register() function so that insight could > benifit from the fix also. print_register() and do_register_row() affect cli > gdb only.