Conversation
|
hmm, if there's a hardware instruction for sqrt, maybe we should add The other problem a builtin would solve is executing std.math.sqrt at compile time. Without a builtin, we would need some kind of feature to detect whether we're executing at compile time or not. (because inline assembly cannot be executed at compile time). We would still need the zig implementation of sqrt (with the modification proposed here) to put into builtin.o, because the sqrt llvm intrinsic can lower to a call to that function. So this is good to merge. I'll add a new issue. |
In the process of doing the remaining i386/x86_64 instructions too. Need to work out some inline assembly issues first.