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

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: arm port. 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
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));
Yang 2015/03/05 07:36:45 Probably better to use %ConstructDouble instead of
Benedikt Meurer 2015/03/05 08:51:46 Done.
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

Powered by Google App Engine
This is Rietveld 408576698