Preventing scheduling of normal operations across calls to built-ins
Ayonam Ray
ayonam@gmail.com
Thu Feb 23 04:01:00 GMT 2012
On 23 February 2012 07:56, Ian Lance Taylor <iant@google.com> 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
More information about the Gcc-help
mailing list