View Single Post
Old 28 October 2019, 15:47   #4

phx's Avatar
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,774
No, you cannot restrict the code generator to use certain registers in a function. But to minimize assembler usage you could either use the __saveall attribute, which also saves/restores all (used) volatile registers, or insert inline-assembler to save them: __asm("\tstw\tr4,offset(r1)");
You might also want to use the __interrupt attribute, which makes sure that such a function ends with "rfi" instead of "blr".
phx is offline  
Page generated in 0.06934 seconds with 11 queries