D for Game Development

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 9 01:05:40 PDT 2015


On 9 August 2015 at 09:53, Walter Bright via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On 8/9/2015 12:36 AM, Iain Buclaw via Digitalmars-d wrote:
>
>> What about intrinsics?
>>
>>
>> https://github.com/D-Programming-Language/phobos/blob/94f718e5c69939f595fb839d3aae24878f126d78/std/math.d#L630
>>
>
> There isn't a simd cosine instruction, so making cos(double) builtin
> accomplishes nothing. However, the casting in those functions go away when
> code is generated.
>
> For example:
>
>   import std.math;
>   double foo(double d) {
>     return cos(d);
>   }
>
> generates:
>
>   _D3foo3fooFdZd:
>                 fld     qword ptr 4[ESP]
>                 fcos
>                 ret     8
>

This is on Windows?  I'm not seeing this on Linux.  http://goo.gl/58yhwU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150809/34dcb89a/attachment.html>


More information about the Digitalmars-d mailing list