Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] MIPS: Introduce struct mips_regnums and accessors
Date: Wed, 21 May 2003 19:39:00 -0000	[thread overview]
Message-ID: <3ECBD5C3.3000706@redhat.com> (raw)
In-Reply-To: <1030515235130.ZM7492@localhost.localdomain>

Kevin,

I think the struct contains too many redudnant fields.  Instead it can 
be be trimmed back to identify just the boundaries between the different 
register groups vis:

- gp0 (gp31?)
- fp0
- hi, lo
- pc
- various status registers
- others?

As for assigning meaning to specific registers (v0, a0, ...) within a 
group, offsets can be used vis:

	v0_regnum (regnums) === regnums->gp0 + offset;

With regard to having only 16 o32 FP registers, is that right?  Does it 
just confuse things?  Doesn't the o32 debug info assume a bank of 32 
contigious 32 bit registers?  A location expression for a double in 
``f0'' would be f0:f1 for instance.

Andrew


> +/* MIPS register numbers.  */
> +struct mips_regnums
> +  {
> +    int zero_regnum;		/* The zero register; read-only, always 0.  */
> +    int v0_regnum;		/* Function return value.  */
> +    int a0_regnum;		/* First GPR used for passing arguments.  */
> +    int t9_regnum;		/* Contains address of callee in PIC code.  */
> +    int sp_regnum;		/* Stack pointer.  */
> +    int ra_regnum;		/* Return address.  */
> +    int ps_regnum;		/* Processor status.  */
> +    int hi_regnum;		/* High portion of internal multiply/divide
> +				   register.  */
> +    int lo_regnum;		/* Low portion of internal multiply/divide
> +    				   register.  */
> +    int badvaddr_regnum;	/* Address associated with
> +    				   addressing exception.  */
> +    int cause_regnum;		/* Describes last exception.  */
> +    int pc_regnum;		/* Program counter.  */
> +    int fcrcs_regnum;		/* FP control/status.  */
> +    int fcrir_regnum;		/* FP implementation/revision.  */
> +    int fp0_regnum;		/* First floating point register.  */
> +    int fplast_regnum;		/* Last floating point register.  */
> +    int fpa0_regnum;		/* First floating point register used for
> +    				   passing floating point arguments.  */
> +    int first_embed_regnum;	/* First CP0 register for embedded use.  */
> +    int last_embed_regnum;	/* Last CP0 register for embedded use.  */
> +    int prid_regnum;		/* Processor ID.  */
> +
> +    int last_arg_regnum;	/* Last general purpose register used for
> +    				   passing arguments.  (a0_regnum is the
> +				   first.)  */
> +    int last_fp_arg_regnum;	/* Last floating point register used for
> +    				   passing floating point arguments.  */
> +  };



  reply	other threads:[~2003-05-21 19:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-15 23:51 Kevin Buettner
2003-05-21 19:39 ` Andrew Cagney [this message]
2003-05-21 20:40   ` Kevin Buettner
2003-05-22 19:41     ` Andrew Cagney
2003-05-22 20:16       ` Kevin Buettner
2003-06-15 18:37         ` 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=3ECBD5C3.3000706@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@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