summaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-08-01 23:10:34 +0000
committerKevin Buettner <kevinb@redhat.com>2002-08-01 23:10:34 +0000
commitc92b78aa8146a301c681d9480f637117becf9c58 (patch)
tree2e3ec7fe4e5c7f7b4410708903b59556e3f2726b /gdb/mips-tdep.c
parent020542d474f742e46d71e93e3640213c1ec967ce (diff)
downloadgdb-c92b78aa8146a301c681d9480f637117becf9c58.tar.gz
* mips-tdep.c (mips_register_virtual_type): Use architecture
invariant return values.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index de7946e8e85..45b5813e747 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;
}
}