View Single Post
Old 28 October 2019, 14:15   #2
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 888
Originally Posted by Hedeon View Post
IF I want to make this in C, I need to restrict the usage of registers to these 4. Is this even possible with VBCC?
I'm not 100% sure this will work, but you would need to modify the backend to mark registers r4 - r31 as allocated in the init_cg function (regsa[n]=1; careful, the register number doesn't map directly to n - see the register names array.) - then modify the t1, t2 and t3 values to restrict the compiler's internal scratch registers to the allowed range. You'll leave just one register free for the compiler's use so expect to see lots of stack operations.
robinsonb5 is online now  
Page generated in 0.08121 seconds with 11 queries