aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2002-11-22 23:59:20 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2002-11-22 23:59:20 +0000
commit03dac896be17cbdc8434a4f40ca7c200a9c36ea3 (patch)
tree32c2a6663c947d2c4605b11417deeee01f426aa2
parent1fdb3c684d309135936ffa7e7c9bfb3c993bcf4d (diff)
downloadgdb-03dac896be17cbdc8434a4f40ca7c200a9c36ea3.zip
gdb-03dac896be17cbdc8434a4f40ca7c200a9c36ea3.tar.gz
gdb-03dac896be17cbdc8434a4f40ca7c200a9c36ea3.tar.bz2
* m68k-tdep.c (m68k_register_virtual_type): Use architecture
invariant return values.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/m68k-tdep.c25
2 files changed, 18 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9bd4cab..df3ed27 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-23 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c (m68k_register_virtual_type): Use architecture
+ invariant return values.
+
2002-11-22 Andreas Schwab <schwab@suse.de>
* valops.c (value_slice): Move declaration of `offset' to avoid
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 7039e64..6859b50 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -159,18 +159,19 @@ m68k_register_virtual_size (int regnum)
static struct type *
m68k_register_virtual_type (int regnum)
{
- if (regnum == E_FPI_REGNUM)
- return lookup_pointer_type (builtin_type_void);
- else if ((unsigned) regnum >= E_FPC_REGNUM)
- return builtin_type_int;
- else if ((unsigned) regnum >= FP0_REGNUM)
- return builtin_type_long_double;
- else if (regnum == PS_REGNUM)
- return builtin_type_int;
- else if ((unsigned) regnum >= A0_REGNUM)
- return lookup_pointer_type (builtin_type_void);
- else
- return builtin_type_int;
+ if (regnum >= FP0_REGNUM && regnum <= FP0_REGNUM + 7)
+ return builtin_type_m68881_ext;
+
+ if (regnum == E_FPI_REGNUM || regnum == PC_REGNUM)
+ return builtin_type_void_func_ptr;
+
+ if (regnum == E_FPC_REGNUM || regnum == E_FPS_REGNUM || regnum == PS_REGNUM)
+ return builtin_type_int32;
+
+ if (regnum >= A0_REGNUM && regnum <= A0_REGNUM + 7)
+ return builtin_type_void_data_ptr;
+
+ return builtin_type_int32;
}
/* Function: m68k_register_name