
DocID13284 Rev 2
57/564
UM0404
The central processing unit (CPU)
This prevents delays that would cause the pipeline to become noticeable to the user.
However, there are some cases where allowances must be made by the programmer, for
the pipeline architecture of the ST10F276.
In these cases the delays caused by pipeline conflicts can be used for other instructions in
order to optimize performance.
Context pointer updating
An instruction which calculates a physical GPR operand address via the CP register, is
generally not capable of using a new CP value, which is to be updated by an immediately
preceding instruction. Therefore, to make sure that the new CP value is used, at least one
instruction must be inserted between a CP changing and a subsequent GPR using
instruction, as shown in the example.
Data page pointer updating
An instruction which calculates a physical operand address via a particular DPPn (n=0 to 3)
register, is generally not capable of using a new DPPn register value, which is to be updated
by an immediately preceding instruction. Therefore, to make sure that the new DPPn
register value is used, at least one instruction must be inserted between a DPPn-changing
instruction and a subsequent instruction which implicitly uses DPPn via a long or indirect
addressing mode, as shown in the example.
Explicit stack pointer updating
None of the RET, RETI, RETS, RETP or POP instructions are capable of correctly using a
new SP register value, which is to be updated by an immediately preceding instruction.
Therefore, in order to use the new SP register value without erroneously performed stack
accesses, at least one instruction must be inserted between an explicit SP writing and any
subsequent of the just mentioned implicitly SP using instructions, as shown in the example.
In
: SCXT CP, #0FC00h
; select a new context
In+1
: ....
; must not be an instruction using a GPR
In+2
: MOV R0, #dataX
; write to GPR 0 in the new context
In
: MOV DPP0, #4
; select data page 4 via DPP0
In+1
: ....
; must not be an instr using DPP0
In+2
: MOV DPP0:0000h, R1
; move contents of R1 to address loc
; 01’0000h
; (in dp 4) supposed segmentation is
; enabled
In
: MOV SP, #0FA40h
; select a new top of stack
In+1
: ....
; must not be an instruction popping
; operands from the system stack
In+2
: POP R0
; pop Word value from new top of stack
; into R0