On 23 February 2012 07:56, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > > Not directly, no, but I don't think it's what you want to do anyhow. > > Ian Actually what you said earlier is exactly what is happening. The compiler is assuming that function calls only clobber memory and since there were no register dependencies created, it was pulling up all the calls to the built-ins before the arithmetic operations. When I changed the variable Val from an auto int variable to a pointer to an int in the global space and changed all reference to it appropriately, everything fell back into shape. When you say convert the built-in into an asm do you mean that I should replace the built-in itself with inline assembly in the source that I am compiling or is that something that I can do in the expand stage of the built-in? I will explore the latter with other ports while I await your reply. Thanks and regards Ayonam