Instruction pointers are a bit limited in
mi.
You cannot add to them or setip to a variable label
name.
===> this is on purpose. You can only brabch to an
existing static label.
Branch to instruction pointer
B pLbl ;
Risc code:
LQ
26,0XF2E0(31),2
032
BCLA
12,21,0X8020
LD
3,0X1B0(28)
TXER
0,0,42
LD 2,0X0(27) <=== R2 now address to
jump
to
LD
0,0X8(27)
MTSPR 9,2 <=== load counter
register
TD
24,3,0
BCCTR 20,0 <=== jump (the 20 means
unconditionmally)
BCCTR is "branch conditional to the address
contained in the counter register".
It looks like the risc instructions do allow
the branching to a variable instruction number. no?
===> of course. The PPC is just an ordinary
computer
Is the counter register 64 bits?
===> yes
Does the powerpc risc have the ability to
branch to code in another pgm?
===> yes, but the MI architecture does not
support it directly.
(also a security risk)
===> if you patch the program you can arrange to branch
to
a parameter. This gives you the ability to execute
RISC
instructions that are part of your data (and therefore
are
under your control).