This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: m68k_register_virtual_type
Andrew Cagney <ac131313@redhat.com> writes:
|> Er, yes. (And eventually long_double to builtin_type_m68881_ext but the
|> last one might have fallout related to register conversions).
I have now committed this patch.
Andreas.
2002-11-23 Andreas Schwab <schwab@suse.de>
* m68k-tdep.c (m68k_register_virtual_type): Use architecture
invariant return values.
--- m68k-tdep.c.~1.28.~ 2002-11-23 00:53:11.000000000 +0100
+++ m68k-tdep.c 2002-11-23 00:53:32.000000000 +0100
@@ -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
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."