View Single Post
Old 14 January 2020, 11:44   #8
Hedeon
PPC Hacker

 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,246
I meant a C function calling an asm function. I use r3-r12 in those asm functions and was hoping that that would be possible without saving them all and then restoring them again inside the asm function. You say they are saved in the caller function so that is great.

Regarding r13-r31, that was a duh moment as I should have known that :-)

WarpOS has a small exception context that directly uses all the registers from the original interrupted task. However, the main exception itself (which is mostly C) of course changes a lot of these registers before it jumps to the custom exception handler (wosdb uses large exception context in which the interrupted task registers are used indirectly from the context, iFusion uses small context. Only two programs I know that uses them).

I had hoped that I just needed to reload the volatile registers before jumping to the small context custom exception, but I just better reload all the registers (they were saved in a stack frame when the main exception happened).

Thanks for your help. Now to finish this project quickly :-)
Hedeon is offline  
 
Page generated in 0.04204 seconds with 11 queries