v8/test/mjsunit/compiler/regress-445858.js
bmeurer cf866b7c61 [x64] Rearrange code for OOB integer loads.
We cannot just clear the result register optimistically, because the
register allocator might assign the same register to result and buffer.

TEST=mjsunit/compiler/regress-445858
BUG=chromium:445858
LOG=y
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25950}
2015-01-02 10:15:40 +00:00

16 lines
432 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.
var foo = (function module(stdlib, foreign, heap) {
"use asm";
var MEM = new stdlib.Int8Array(heap);
function foo(i) {
i = i|0;
i[0] = i;
return MEM[i + 1 >> 0]|0;
}
return { foo: foo };
})(this, {}, new ArrayBuffer(64 * 1024)).foo;
foo(-1);