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

Unified Diff: test/mjsunit/compiler/regress-register-allocator.js

Issue 671393002: [x86] Fix register constraints for multiply-high. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added regression test. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/compiler/regress-register-allocator.js
diff --git a/test/mjsunit/compiler/regress-register-allocator.js b/test/mjsunit/compiler/regress-register-allocator.js
new file mode 100644
index 0000000000000000000000000000000000000000..08877eeb0030ab42655eed7d2bea0c3daca2bba4
--- /dev/null
+++ b/test/mjsunit/compiler/regress-register-allocator.js
@@ -0,0 +1,33 @@
+// 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));
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698