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

Unified Diff: test/mjsunit/regress/regress-crbug-145961.js

Issue 10914072: Support register as right operand in min/max support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleaned up test. Created 8 years, 3 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
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-145961.js
diff --git a/test/mjsunit/regress/regress-110509.js b/test/mjsunit/regress/regress-crbug-145961.js
similarity index 85%
copy from test/mjsunit/regress/regress-110509.js
copy to test/mjsunit/regress/regress-crbug-145961.js
index 132bd233bee32f6c84061049224ea43901dae06a..b05cf11cc3c93d8de3631ea5e024886a1d5873ec 100644
--- a/test/mjsunit/regress/regress-110509.js
+++ b/test/mjsunit/regress/regress-crbug-145961.js
@@ -25,17 +25,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// This test causes the operands to be passed in as Integer32 registers.
// Flags: --allow-natives-syntax
-
-// Verify that LRandom preserves rsi correctly.
-
-function foo() {
- Math.random();
- new Function("");
+function test() {
+ var a = new Int32Array(2);
+ var x = a[0];
+ return Math.min(x, x);
}
-foo();
-foo();
-foo();
-%OptimizeFunctionOnNextCall(foo);
-foo();
+assertEquals(-1, test());
+assertEquals(-1, test());
+%OptimizeFunctionOnNextCall(test);
+assertEquals(-1, test());
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698