Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: test/mjsunit/double-intrinsics.js

Issue 2083453002: [builtins] Introduce proper Float64Tan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/asm/construct-double.js ('k') | test/mjsunit/es6/math-log2-log10.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --allow-natives-syntax 5 // Flags: --allow-natives-syntax
6 6
7 function assertDoubleBits(hi, lo, x) { 7 function assertDoubleBits(hi, lo, x) {
8 hi = hi | 0; 8 hi = hi | 0;
9 lo = lo | 0; 9 lo = lo | 0;
10 assertEquals(x, %_ConstructDouble(hi, lo)); 10 assertEquals(x, %ConstructDouble(hi, lo));
11 assertEquals(hi, %_DoubleHi(x)); 11 assertEquals(hi, %_DoubleHi(x));
12 assertEquals(lo, %_DoubleLo(x)); 12 assertEquals(lo, %_DoubleLo(x));
13 assertEquals(x, %_ConstructDouble(%_DoubleHi(x), %_DoubleLo(x))); 13 assertEquals(x, %ConstructDouble(%_DoubleHi(x), %_DoubleLo(x)));
14 } 14 }
15 15
16 16
17 var tests = [0x7ff00000, 0x00000000, Infinity, 17 var tests = [0x7ff00000, 0x00000000, Infinity,
18 0xfff00000, 0x00000000, -Infinity, 18 0xfff00000, 0x00000000, -Infinity,
19 0x80000000, 0x00000000, -0, 19 0x80000000, 0x00000000, -0,
20 0x400921fb, 0x54442d18, Math.PI, 20 0x400921fb, 0x54442d18, Math.PI,
21 0xc00921fb, 0x54442d18, -Math.PI, 21 0xc00921fb, 0x54442d18, -Math.PI,
22 0x4005bf0a, 0x8b145769, Math.E, 22 0x4005bf0a, 0x8b145769, Math.E,
23 0xc005bf0a, 0x8b145769, -Math.E, 23 0xc005bf0a, 0x8b145769, -Math.E,
24 0xbfe80000, 0x00000000, -0.75]; 24 0xbfe80000, 0x00000000, -0.75];
25 25
26 26
27 for (var i = 0; i < tests.length; i += 3) { 27 for (var i = 0; i < tests.length; i += 3) {
28 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]); 28 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]);
29 } 29 }
30 30
31 %OptimizeFunctionOnNextCall(assertDoubleBits); 31 %OptimizeFunctionOnNextCall(assertDoubleBits);
32 32
33 for (var i = 0; i < tests.length; i += 3) { 33 for (var i = 0; i < tests.length; i += 3) {
34 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]); 34 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]);
35 assertOptimized(assertDoubleBits); 35 assertOptimized(assertDoubleBits);
36 } 36 }
OLDNEW
« no previous file with comments | « test/mjsunit/asm/construct-double.js ('k') | test/mjsunit/es6/math-log2-log10.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698