This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
think-o: ARM register byte ps VS fps?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 17 Apr 2002 16:06:58 -0400
- Subject: think-o: ARM register byte ps VS fps?
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