From: Richard Henderson <rth@twiddle.net>
To: gdb-patches@sources.redhat.com
Subject: [RFA] better alpha_register_virtual_type
Date: Mon, 02 Jun 2003 05:04:00 -0000 [thread overview]
Message-ID: <20030602050358.GA7443@twiddle.net> (raw)
Ok?
r~
* alpha-tdep.c (alpha_register_virtual_type): Use void_data_ptr
for SP, GP; void_func_ptr for PC; non-language-specific types
for all others.
* alpha-tdep.h (ALPHA_GP_REGNUM): New.
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.95
diff -c -p -d -u -p -r1.95 alpha-tdep.c
--- alpha-tdep.c 2 Jun 2003 04:32:19 -0000 1.95
+++ alpha-tdep.c 2 Jun 2003 04:46:18 -0000
@@ -89,8 +89,17 @@ alpha_register_convertible (int regno)
static struct type *
alpha_register_virtual_type (int regno)
{
- return ((regno >= FP0_REGNUM && regno < (FP0_REGNUM+31))
- ? builtin_type_double : builtin_type_long);
+ if (regno == ALPHA_SP_REGNUM || regno == ALPHA_GP_REGNUM)
+ return builtin_type_void_data_ptr;
+ if (regno == ALPHA_PC_REGNUM)
+ return builtin_type_void_func_ptr;
+
+ /* Don't need to worry about little vs big endian until
+ some jerk tries to port to alpha-unicosmk. */
+ if (regno >= FP0_REGNUM && regno < FP0_REGNUM + 31)
+ return builtin_type_ieee_double_little;
+
+ return builtin_type_int64;
}
/* Is REGNUM a member of REGGROUP? */
Index: alpha-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.h,v
retrieving revision 1.15
diff -c -p -d -u -p -r1.15 alpha-tdep.h
--- alpha-tdep.h 1 Jun 2003 21:46:37 -0000 1.15
+++ alpha-tdep.h 2 Jun 2003 04:46:19 -0000
@@ -43,9 +43,10 @@
#define ALPHA_GCC_FP_REGNUM 15 /* Used by gcc as frame register */
#define ALPHA_A0_REGNUM 16 /* Loc of first arg during a subr call */
#define ALPHA_T9_REGNUM 23 /* Return address register for OSF/1 __div* */
+#define ALPHA_RA_REGNUM 26 /* Contains return address value */
#define ALPHA_T12_REGNUM 27 /* Contains start addr of current proc */
+#define ALPHA_GP_REGNUM 29 /* Contains the global pointer */
#define ALPHA_SP_REGNUM 30 /* Contains address of top of stack */
-#define ALPHA_RA_REGNUM 26 /* Contains return address value */
#define ALPHA_ZERO_REGNUM 31 /* Read-only register, always 0 */
#define ALPHA_FP0_REGNUM 32 /* Floating point register 0 */
#define ALPHA_FPA0_REGNUM 48 /* First float arg during a subr call */
next reply other threads:[~2003-06-02 5:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-02 5:04 Richard Henderson [this message]
2003-06-02 16:30 ` Daniel Jacobowitz
2003-06-02 16:43 ` Richard Henderson
2003-06-02 17:09 ` Daniel Jacobowitz
2003-06-02 19:06 ` Andrew Cagney
2003-06-02 22:39 ` Richard Henderson
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=20030602050358.GA7443@twiddle.net \
--to=rth@twiddle.net \
--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