I am using the Diab C compiler (v5.9.4) for the PowerPC and I need to copy the content of a General purpose register into a function's local variable.
Are there any examples of how can I read a GPR and move its value in a variable in C?
I am using the Diab C compiler (v5.9.4) for the PowerPC and I need to copy the content of a General purpose register into a function's local variable.
Are there any examples of how can I read a GPR and move its value in a variable in C?
The compiler you mentioned is likely a variant of Clang or GCC. You can write inline assembly as below: