Mercurial > projects > ldc
comparison tango.patch @ 1081:5710440ea420
Oops, had some unsaved changes
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 10 Mar 2009 04:56:28 +0100 |
parents | 4e388d9d0e25 |
children |
comparison
equal
deleted
inserted
replaced
1080:44d1c557a07b | 1081:5710440ea420 |
---|---|
15 - version = LDC_X86; | 15 - version = LDC_X86; |
16 - } | 16 - } |
17 } | 17 } |
18 | 18 |
19 /* | 19 /* |
20 @@ -312,26 +308,12 @@ | 20 @@ -312,28 +308,14 @@ |
21 * Results are undefined if |x| >= $(POWER 2,64). | 21 * Results are undefined if |x| >= $(POWER 2,64). |
22 */ | 22 */ |
23 | 23 |
24 -version(LDC) | 24 -version(LDC) |
25 +real cos(real x) /* intrinsic */ | 25 +real cos(real x) /* intrinsic */ |
31 { | 31 { |
32 - alias llvm_cos_f80 cos; | 32 - alias llvm_cos_f80 cos; |
33 + return llvm_cos(x); | 33 + return llvm_cos(x); |
34 } | 34 } |
35 - else | 35 - else |
36 - { | 36 + else version(D_InlineAsm_X86) |
37 { | |
37 - real cos(real x) | 38 - real cos(real x) |
38 - { | 39 - { |
39 - return tango.stdc.math.cosl(x); | 40 - return tango.stdc.math.cosl(x); |
40 - } | 41 - } |
41 - } | 42 - } |
42 -} | 43 -} |
43 -else | 44 -else |
44 -{ | 45 -{ |
45 -real cos(real x) /* intrinsic */ | 46 -real cos(real x) /* intrinsic */ |
46 -{ | 47 -{ |
47 version(D_InlineAsm_X86) | 48 - version(D_InlineAsm_X86) |
48 { | 49 - { |
49 asm | 50 asm |
51 { | |
52 fld x; | |
50 @@ -345,7 +327,6 @@ | 53 @@ -345,7 +327,6 @@ |
51 return tango.stdc.math.cosl(x); | 54 return tango.stdc.math.cosl(x); |
52 } | 55 } |
53 } | 56 } |
54 -} | 57 -} |
55 | 58 |
56 debug(UnitTest) { | 59 debug(UnitTest) { |
57 unittest { | 60 unittest { |
58 @@ -366,26 +347,12 @@ | 61 @@ -366,28 +347,14 @@ |
59 * Bugs: | 62 * Bugs: |
60 * Results are undefined if |x| >= $(POWER 2,64). | 63 * Results are undefined if |x| >= $(POWER 2,64). |
61 */ | 64 */ |
62 -version(LDC) | 65 -version(LDC) |
63 +real sin(real x) /* intrinsic */ | 66 +real sin(real x) /* intrinsic */ |
69 { | 72 { |
70 - alias llvm_sin_f80 sin; | 73 - alias llvm_sin_f80 sin; |
71 + return llvm_sin(x); | 74 + return llvm_sin(x); |
72 } | 75 } |
73 - else | 76 - else |
74 - { | 77 + else version(D_InlineAsm_X86) |
78 { | |
75 - real sin(real x) | 79 - real sin(real x) |
76 - { | 80 - { |
77 - return tango.stdc.math.sinl(x); | 81 - return tango.stdc.math.sinl(x); |
78 - } | 82 - } |
79 - } | 83 - } |
80 -} | 84 -} |
81 -else | 85 -else |
82 -{ | 86 -{ |
83 -real sin(real x) /* intrinsic */ | 87 -real sin(real x) /* intrinsic */ |
84 -{ | 88 -{ |
85 version(D_InlineAsm_X86) | 89 - version(D_InlineAsm_X86) |
86 { | 90 - { |
87 asm | 91 asm |
92 { | |
93 fld x; | |
88 @@ -399,7 +366,6 @@ | 94 @@ -399,7 +366,6 @@ |
89 return tango.stdc.math.sinl(x); | 95 return tango.stdc.math.sinl(x); |
90 } | 96 } |
91 } | 97 } |
92 -} | 98 -} |