Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb@sources.redhat.com, Richard.Earnshaw@arm.com
Subject: Re: think-o: ARM register byte ps VS fps?
Date: Thu, 18 Apr 2002 02:57:00 -0000	[thread overview]
Message-ID: <200204180956.KAA16630@cam-mail2.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Wed, 17 Apr 2002 16:06:58 EDT." <3CBDD5E2.7000904@cygnus.com>

> Hello,
> 
> I'm looking at the code:
> 
> static int
> arm_register_byte (int regnum)
> {
>    if (regnum < ARM_F0_REGNUM)
>      return regnum * INT_REGISTER_RAW_SIZE;
>    else if (regnum < ARM_PS_REGNUM)
>      return (NUM_GREGS * INT_REGISTER_RAW_SIZE
> 	    + (regnum - ARM_F0_REGNUM) * FP_REGISTER_RAW_SIZE);
>    else
>      return (NUM_GREGS * INT_REGISTER_RAW_SIZE
> 	    + NUM_FREGS * FP_REGISTER_RAW_SIZE
> 	    + (regnum - ARM_FPS_REGNUM) * STATUS_REGISTER_SIZE);
> }
> 
> where:
> 
> #define ARM_FPS_REGNUM 24	/* floating point status register */
> #define ARM_PS_REGNUM 25	/* Contains processor status */
> 
> While I suspect it ``works'', would ``(regnum < ARM_FPS_REGNUM)'' be better?
> 
> enjoy,
> Andrew
> 

Rewriting it as a table of constants would probably be better still.

I'll add it to my (copious) todo list.

R.


      reply	other threads:[~2002-04-18  9:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-17 13:06 Andrew Cagney
2002-04-18  2:57 ` Richard Earnshaw [this message]

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=200204180956.KAA16630@cam-mail2.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb@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