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

Side by Side Diff: test/mjsunit/asm/word32ror.js

Issue 732103002: [turbofan] remove redundant '& 0x1F' for shifts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + ror fix Created 6 years, 1 month 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 2014 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 var stdlib = {};
6 var foreign = {};
7 var heap = new ArrayBuffer(64 * 1024);
8
9 var rol = (function Module(stdlib, foreign, heap) {
10 "use asm";
11 function rol(x, y) {
12 x = x | 0;
13 y = y | 0;
14 return (x << y) | (x >>> (32 - y));
15 }
16 return { rol: rol };
17 })(stdlib, foreign, heap).rol;
18
19 assertEquals(10, rol(10, 0));
20 assertEquals(2, rol(1, 1));
21 assertEquals(0x40000000, rol(1, 30));
22 assertEquals(-0x80000000, rol(1, 31));
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-machine-operator-reducer.cc ('k') | test/unittests/compiler/machine-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698