v8/test/mjsunit/compiler/regress-register-allocator.js
bmeurer@chromium.org 548fb46331 [x86] Fix register constraints for multiply-high.
TEST=mjsunit/compiler,unittests
R=titzer@chromium.org

Review URL: https://codereview.chromium.org/671393002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 09:36:40 +00:00

34 lines
723 B
JavaScript

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function Module(stdlib, foreign, buffer) {
"use asm";
var HEAP32 = new stdlib.Int32Array(buffer);
function g(a) {
HEAP32[a] = 9982 * 100;
return a;
}
function f(i1) {
i1 = i1 | 0;
var i2 = HEAP32[i1 >> 2] | 0;
g(i1);
L2909: {
L2: {
if (0) {
if (0) break L2;
g(i2);
break L2909;
}
}
var r = (HEAP32[1] | 0) / 100 | 0;
g(r);
return r;
}
}
return {f: f};
}
var f = Module(this, {}, new ArrayBuffer(64 * 1024)).f;
assertEquals(9982, f(1));