-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phobos: Enable x87 asm versions for std.math.{tan,expi} #2855
Conversation
Hmm, calling another function by name directly doesn't work in naked DMD-style asm if compiled as PIC, so the return-real.nan-workaround by calling a helper function isn't viable either... |
I haven't got an inline asm tangent or sincos implementation to work with LDC yet. However, I did have some apparent success with this particular part of the problem by declaring |
That should have the same problem when compiled as PIC ( |
Revived this with a viable workaround for PIC (pass void main()
{
enum MAXITER = 1 << 20;
import std.datetime.stopwatch;
import std.math;
import std.stdio;
real sum = 0;
auto sw = StopWatch(AutoStart.yes);
for(uint i; i < MAXITER; i++)
sum += tan(real(i)); // also tested with `real(i) / MAXITER`
sw.stop();
writeln(sw.peek.total!"msecs", "ms\t", sum);
} |
The x87 asm for |
Following #2854.