This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Fix double size for sh2e and sh3e cpus
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 15 Jul 2003 15:54:20 -0400
- Subject: Re: [RFA] Fix double size for sh2e and sh3e cpus
- References: <20030714152937.GB12368@cygbert.vinschen.de>
Corinna Vinschen writes:
> The double datatype is defined as having 8 byte on all sh models.
> But the sh2e and sh3e models are having 4 byte doubles due to their
> fpu supporting 4 byte floting point only. The attached patch (relative
> to the previous undeprecate patch) fixes that.
>
> Corinna
OK.
elena
>
> * sh-tdep.c (sh_gdbarch_init): Set double to 4 byte on sh2e and sh3e.
>
> --- sh-tdep.c.ORIG 2003-07-14 15:40:35.000000000 +0200
> +++ sh-tdep.c 2003-07-14 17:28:56.000000000 +0200
> @@ -4386,6 +4386,9 @@ sh_gdbarch_init (struct gdbarch_info inf
> set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
> break;
> case bfd_mach_sh2e:
> + /* doubles on sh2e and sh3e are actually 4 byte. */
> + set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
> +
> set_gdbarch_register_name (gdbarch, sh_sh2e_register_name);
> set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
> sh_show_regs = sh2e_show_regs;
> @@ -4446,6 +4449,9 @@ sh_gdbarch_init (struct gdbarch_info inf
> set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
> break;
> case bfd_mach_sh3e:
> + /* doubles on sh2e and sh3e are actually 4 byte. */
> + set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
> +
> set_gdbarch_register_name (gdbarch, sh_sh3e_register_name);
> set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
> sh_show_regs = sh3e_show_regs;
>
> --
> Corinna Vinschen
> Cygwin Developer
> Red Hat, Inc.
> mailto:vinschen@redhat.com