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

Side by Side Diff: test/mjsunit/asm/construct-double.js

Issue 974313002: [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed Svens comment. Created 5 years, 9 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/cctest/test-disasm-x64.cc ('k') | test/mjsunit/asm/double-hi.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 var stdlib = this;
8 var foreign = {};
9 var heap = new ArrayBuffer(64 * 1024);
10
11
12 var m = (function(stdlib, foreign, heap) {
13 "use asm";
14 function cd1(i, j) {
15 i = i|0;
16 j = j|0;
17 return +%_ConstructDouble(i, j);
18 }
19 function cd2(i) {
20 i = i|0;
21 return +%_ConstructDouble(0, i);
22 }
23 return { cd1: cd1, cd2: cd2 };
24 })(stdlib, foreign, heap);
25
26 assertEquals(0.0, m.cd1(0, 0));
27 assertEquals(%ConstructDouble(0, 1), m.cd2(1));
28 for (var i = -2147483648; i < 2147483648; i += 3999773) {
29 assertEquals(%ConstructDouble(0, i), m.cd2(i));
30 for (var j = -2147483648; j < 2147483648; j += 3999773) {
31 assertEquals(%ConstructDouble(i, j), m.cd1(i, j));
32 }
33 }
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-x64.cc ('k') | test/mjsunit/asm/double-hi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698