Hi,
Is it possible to bind a physical register to a particular global value? For instance, can I say that the global variable %omnipresent should be allocated not to memory, but instead to register %EAX.
Thanks
Nikhil
Hi,
Is it possible to bind a physical register to a particular global value? For instance, can I say that the global variable %omnipresent should be allocated not to memory, but instead to register %EAX.
Thanks
Nikhil
GCC has an extension to do this (see its user manual) and we support this. Note that this does not guarantee that the register will always hold the value of the global: the guarantee only holds during inline asm blocks.
-Chris
Is it possible to bind a physical register to a particular global value? For
instance, can I say that the global variable %omnipresent should be
allocated not to memory, but instead to register %EAX.GCC has an extension to do this (see its user manual) and we support this.
Note that this does not guarantee that the register will always hold the
value of the global: the guarantee only holds during inline asm blocks.
Great! Thanks for the pointer. I intend to blacklist this “global” register during register allocation, so this should be good enough!