Chapter 10 XGATE (S12XGATEV3)
MC9S12XE-Family Reference Manual , Rev. 1.19
454
Freescale Semiconductor
Operation
TFR RD,CCR: CCR
⇒
RD[3:0]; 0
⇒
RD[15:4]
TFR CCR,RD: RD[3:0]
⇒
CCR
TFR RD,PC:
PC+4
⇒
RD
Transfers the content of one RISC core register to another.
The TFR RD,PC instruction can be used to implement relative subroutine calls.
Example:
TFR
R7,PC
;Return address (RETADDR) is stored in R7
BRA
SUBR
;Relative branch to subroutine (SUBR)
RETADDR
...
SUBR
...
JAL
R7
;Jump to return address (RETADDR)
CCR Effects
Code and CPU Cycles
TFR
Transfer from and to Special Registers
TFR
Source Form
Address
Mode
Machine Code
Cycles
TFR RD,CCR CCR
⇒
RD
MON
0
0
0
0
0
RD
1
1
1
1
1
0
0
0
P
TFR CCR,RS RS
⇒
CCR
MON
0
0
0
0
0
RS
1
1
1
1
1
0
0
1
P
TFR RD,PCPC+4
⇒
RD
MON
0
0
0
0
0
RD
1
1
1
1
1
0
1
0
P
TFR RD,CCR, TFR RD,PC:
TFR CCR,RS:
N
Z
V
C
—
—
—
—
N:
Not affected.
Z:
Not affected.
V:
Not affected.
C:
Not affected.
N
Z
V
C
∆
∆
∆
∆
N:
RS[3].
Z:
RS[2].
V:
RS[1].
C:
RS[0].
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:
S12XE
products
in
208
MAPBGA
packages