Re: [PATCH v3] gdb: bfin: new port

Mike Frysinger
2010-12-15T13:02:58Z

[-- Attachment #1: Type: Text/Plain, Size: 1068 bytes --]

On Tuesday, December 14, 2010 17:00:13 Mike Frysinger wrote:
> On Tuesday, December 14, 2010 16:31:22 Pedro Alves wrote:
> > Can you explain why are the PC and CC registers pseudo
> > registers, but supported as being raw registers anyway? Couldn't
> > gdb compute them itself from the other registers, with
> > gdb's pseudo register support (gdbarch_pseudo_register_read|write)?
> > googling I found you mentioning that the "CC pseudo register can
> > be deduced from the ASTAT register", though further googling doesn't
> > find any mention of what ASTAT is. I'm sure there's a good reason,
> > I'm probably just missing a comment somewhere.
>
> CC is actually a single bit in the ASTAT (arithmetic status) register, but
> often is treated as an actual register in much of the ISA. such as
> assignments or logical tests. you can do "<reg> = CC" and "CC = <reg>",
> but you cant do this with any other ASTAT bit (like AZ, AN, etc...).

another data point: gcc itself treats CC as a register.

btw, the name is short for "Control Code"
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]