playstation3spu

SPU Instruction Pointer


I've been searching through the entire manuals and I can't find a single mention of the Instruction Pointer. I need this for a SPU program that I'm writing. Maybe it has a different name? Can anyone tell me how I can access the address of the instruction that is to be executed? Thanks in advance for your help. UPDATE: Apperantly it's called the Program Counter, but how can I access it from within my SPU Program?


Solution

  • If you just want to get the instruction pointer, you can do it in assembly:

    brsl r<n>, .+4
    

    This loads the address of the next instruction into register r<n>.