Hi @abdelrhman
SPR registers can be read/write using these macros:
And here is minimalist code showing how to store content of r10 to RAM address 0x40001000:
__asm("e_lis %r3, 0x4000");
__asm("e_or2i %r3, 0x1000");
__asm("e_stwu %r10, 0x0(%r3)");
Regards,
Lukas