I have a couple of functions written in inline assembly code. (They're am_exp_ps and am_exp_eps from the approximate math library.) When I call them in a test program, they give correct results. However, when I use them in real code, it seems as though they are destroyingwhatever was in the xmm registers before they were called.
That is, the code flow is like this:
F32vec4 x, y, z;
x = F32vec4 (known values); // which has z in an xmm reg
...do some computations to get x;
y = am_exp_ps (x);
...and find that z has been changed!
So, how do I preserve the values? I'd have thought the compiler would take care of it, since I made am_exp_ps an inline function, but apparently not.
Also, is there any documentation around on the inline assembly format? Or examples? What's in the compiler manual is pretty scant. I've got this far mostly on trial & error.