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

Unified Diff: test/mjsunit/bitops-info.js

Issue 6696037: Fix incorrect assumption on bit-and on ARM (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/bitops-info.js
===================================================================
--- test/mjsunit/bitops-info.js (revision 7178)
+++ test/mjsunit/bitops-info.js (working copy)
@@ -37,8 +37,12 @@
return 1600822924; // It's a signed Int32.
}
+function hidden_negative_smi() {
+ var w = -0x20123456; // A negative smi.
Vyacheslav Egorov (Chromium) 2011/03/15 21:53:15 return
+}
function f() {
+ var w = hidden_negative_smi(); // Not a constant.
Vyacheslav Egorov (Chromium) 2011/03/15 21:53:15 you probably wanted to use it somewhere, but did n
var x = non_int32(); // Not a constant.
var y = hidden_smi(); // Not a constant.
var z = hidden_int32();
@@ -66,7 +70,15 @@
assertEquals(46512102 & 2600822924, x & y, "10rev");
assertEquals(1600822924 & 2600822924, x & z, "11rev");
+ assertEquals((46512102 & -0x20123456) | 1, (y & -0x20123456) | 1, "12");
+ assertEquals((1600822924 & -0x20123456) | 1, (z & -0x20123456) | 1, "13");
+ assertEquals((2600822924 & -0x20123456) | 1, (x & -0x20123456) | 1, "14");
+ assertEquals((46512102 & -0x20123456) | 1, (-0x20123456 & y) | 1, "12rev");
+ assertEquals((1600822924 & -0x20123456) | 1, (-0x20123456 & z) | 1, "13rev");
+ assertEquals((2600822924 & -0x20123456) | 1, (-0x20123456 & x) | 1, "14rev");
+
assertEquals(2600822924 & 2600822924, x & x, "xx");
+ assertEquals(2600822924 & 2600822924, x & x, "xx");
assertEquals(y, y & y, "yy");
assertEquals(z, z & z, "zz");
}
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698