COG mode exceptions
pedward
Posts: 1,642
Re: http://code.google.com/p/propgcc/wiki/COGModeExperiences
I think the simpler way to prevent stack references is to use the PASM native CALL instruction so the Propeller native mechanism is used. This would eliminate any stack requirements. This could be hinted in the compiler by the COG memory model switch.
Does this sound reasonable or has that already been explored?
I think the simpler way to prevent stack references is to use the PASM native CALL instruction so the Propeller native mechanism is used. This would eliminate any stack requirements. This could be hinted in the compiler by the COG memory model switch.
Does this sound reasonable or has that already been explored?
Comments
The _NATIVE tag on a function, which is mentioned in the web page you linked to, makes the function be called with CALL. This can't be the default because the C language requires that recursive functions be permitted.
_NATIVE alone is not enough to guarantee that the stack is not used, since local variables may be placed on the stack if the compiler runs out of registers for them.