Orlando Llanes wrote:
Is there a way to specify to GPC, or for GPC to specify to AS, to reference Object fields (variables) using the stack rather than registers? The reason I ask is because my libs won't work as intended when variables are referenced via clobbered registers. I'm weary of making these variables globals because I intend to make them thread safe (somehow) eventually and owuld like each instance to have its own copy of the variables. Thanks in advance!
I'm not sure I really understand your problem. Do your routines rely on no registers being clobbered by other routines? I don't think you could ever rely on this, because registers are used for other purposes, too. Perhaps declaring the variables "volatile" might help, but actually I don't think so. I don't think "volatile" is needed unless the variables are used in different threads at the same time or modified by hardware interrupts or such things. -- Frank Heckenbach, frank@pascal.gnu.de http://fjf.gnu.de/ PGP and GPG keys: http://fjf.gnu.de/plan
participants (1)
-
Frank Heckenbach