diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-08-01 23:10:34 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-08-01 23:10:34 +0000 |
commit | a642592427cf8c41f51cbd9ad352875a1094bbe9 (patch) | |
tree | f997ea2dcbf5ead78347cde9a9a61b21668c3be0 | |
parent | ff5922b5508175a114b51a8ac729e2d8427af3d5 (diff) | |
download | gdb-a642592427cf8c41f51cbd9ad352875a1094bbe9.zip gdb-a642592427cf8c41f51cbd9ad352875a1094bbe9.tar.gz gdb-a642592427cf8c41f51cbd9ad352875a1094bbe9.tar.bz2 |
* mips-tdep.c (mips_register_virtual_type): Use architecture
invariant return values.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 97b01e3..347b4bf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-08-01 Kevin Buettner <kevinb@redhat.com> + + * mips-tdep.c (mips_register_virtual_type): Use architecture + invariant return values. + 2002-08-01 Andrew Cagney <cagney@redhat.com> * linux-proc.c: Include "gdb_string.h". diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index de7946e..45b5813 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -497,19 +497,25 @@ static struct type * mips_register_virtual_type (int reg) { if (FP0_REGNUM <= reg && reg < FP0_REGNUM + 32) - return builtin_type_double; + { + /* Floating point registers... */ + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) + return builtin_type_ieee_double_big; + else + return builtin_type_ieee_double_little; + } else if (reg == PS_REGNUM /* CR */) return builtin_type_uint32; else if (FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM) return builtin_type_uint32; else { - /* Everything else... return ``long long'' when registers - are 64-bits wide, ``int'' otherwise. */ - if (MIPS_REGSIZE == TYPE_LENGTH (builtin_type_long_long)) - return builtin_type_long_long; + /* Everything else... + Return type appropriate for width of register. */ + if (MIPS_REGSIZE == TYPE_LENGTH (builtin_type_uint64)) + return builtin_type_uint64; else - return builtin_type_int; + return builtin_type_uint32; } } |