From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@ges.redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] 64-bit support for Irix 6
Date: Thu, 01 Aug 2002 16:17:00 -0000 [thread overview]
Message-ID: <1020801231716.ZM30708@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@ges.redhat.com> "Re: [PATCH] 64-bit support for Irix 6" (Aug 1, 4:28pm)
On Aug 1, 4:28pm, Andrew Cagney wrote:
> > + set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
>
> Can you please add a comment here explaining that many MIPS targets do
> not yet use this method because they are still defining the macro.
Done. (Separate patch committed a little while ago.)
> As a separate patch, could you please update things so that:
>
> > +static struct type *
> > +mips_register_virtual_type (int reg)
> > +{
> > + if (FP0_REGNUM <= reg && reg < FP0_REGNUM + 32)
> > + return builtin_type_double;
>
> This returns ieee_double big/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;
>
> This returns builtin_type_uint64.
>
> > + else
>
> > + return builtin_type_int;
>
> This returns builtin_type_uint32.
Done. See below:
* mips-tdep.c (mips_register_virtual_type): Use architecture
invariant return values.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.87
diff -u -p -r1.87 mips-tdep.c
--- mips-tdep.c 1 Aug 2002 21:36:27 -0000 1.87
+++ mips-tdep.c 1 Aug 2002 23:02:18 -0000
@@ -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;
}
}
next prev parent reply other threads:[~2002-08-01 23:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-31 11:23 Kevin Buettner
2002-08-01 8:11 ` Andrew Cagney
2002-08-01 9:53 ` Kevin Buettner
2002-08-01 10:42 ` Andrew Cagney
2002-08-01 13:08 ` Kevin Buettner
2002-08-01 13:28 ` Andrew Cagney
2002-08-01 16:17 ` Kevin Buettner [this message]
2002-08-01 13:54 ` Michael Snyder
2002-08-01 14:25 ` Andrew Cagney
2002-08-01 14:47 ` Michael Snyder
2002-08-01 16:38 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020801231716.ZM30708@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@ges.redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox