2-28
MCF5307 User’s Manual
Programming Model
2.2.1.3 Stack Pointer (A7, SP)
The processor core supports a single hardware stack pointer (A7) used during stacking for
subroutine calls, returns, and exception handling. The stack pointer is implicitly referenced
by certain operations and can be explicitly referenced by any instruction specifying an
address register. The initial value of A7 is loaded from the reset exception vector, address
0x0000. The same register is used for user and supervisor modes, and may be used for word
and longword operations.
A subroutine call saves the program counter (PC) on the stack and the return restores the
PC from the stack. The PC and the status register (SR) are saved on the stack during
exception and interrupt processing. The return from exception instruction restores SR and
PC values from the stack.
2.2.1.4 Program Counter (PC)
The PC holds the address of the executing instruction. For sequential instructions, the
processor automatically increments PC. When program ow changes, the PC is updated
with the target instruction. For some instructions, the PC species the base address for
PC-relative operand addressing modes.
2.2.1.5 Condition Code Register (CCR)
ags based on results generated by arithmetic operations.
Table 2-1 describes the CCR eldsMAC Programming
ModelFigure 2-3 shows the registers in the MAC portion of the user programming model. These registers are described as follows:Accumulator (ACC)—This 32-bit, read/write, general-purpose register is used to accumulate the results of MAC operations.
76543210
Field
P
—
X
N
Z
V
C
Reset
0
00
Undened
R/W
R
R/W
Table 2-1. CCR Field Descriptions
Bits
Name
Description
7
P
Branch prediction bit. Alters the static prediction algorithm used by the branch acceleration logic in the
IFP on forward conditional branches.
0 Predicted as not-taken.
1 Predicted as taken.
6–5
—
Reserved, should be cleared.
4
X
Extend condition code bit. Assigned the value of the carry bit for arithmetic operations; otherwise not
affected or set to a specied result. Also used as an input operand for multiple-precision arithmetic.
3
N
Negative condition code bit. Set if the msb of the result is set; otherwise cleared.
2
Z
Zero condition code bit. Set if the result equals zero; otherwise cleared.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.