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

Unified Diff: runtime/vm/assembler_ia32_test.cc

Issue 10968059: Support for unboxed 64-bit integer bitwise operations and equality on ia32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed boxing of smis and added one more 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
Index: runtime/vm/assembler_ia32_test.cc
===================================================================
--- runtime/vm/assembler_ia32_test.cc (revision 12765)
+++ runtime/vm/assembler_ia32_test.cc (working copy)
@@ -1655,6 +1655,46 @@
}
+ASSEMBLER_TEST_GENERATE(Orpd, assembler) {
+ __ movsd(XMM0, Address(ESP, kWordSize));
+ __ orpd(XMM0, XMM0);
+ __ pushl(EAX);
+ __ pushl(EAX);
+ __ movsd(Address(ESP, 0), XMM0);
+ __ fldl(Address(ESP, 0));
+ __ popl(EAX);
+ __ popl(EAX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Orpd, entry) {
+ typedef double (*OrpdCode)(double d);
+ double res = reinterpret_cast<OrpdCode>(entry)(12.56e3);
+ EXPECT_FLOAT_EQ(12.56e3, res, 0.0);
+}
+
+
+ASSEMBLER_TEST_GENERATE(AndPd, assembler) {
+ __ movsd(XMM0, Address(ESP, kWordSize));
+ __ andpd(XMM0, XMM0);
+ __ pushl(EAX);
+ __ pushl(EAX);
+ __ movsd(Address(ESP, 0), XMM0);
+ __ fldl(Address(ESP, 0));
+ __ popl(EAX);
+ __ popl(EAX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(AndPd, entry) {
+ typedef double (*AndpdCode)(double d);
+ double res = reinterpret_cast<AndpdCode>(entry)(12.56e3);
+ EXPECT_FLOAT_EQ(12.56e3, res, 0.0);
+}
+
+
ASSEMBLER_TEST_GENERATE(DoubleAbs, assembler) {
__ movsd(XMM0, Address(ESP, kWordSize));
__ DoubleAbs(XMM0);

Powered by Google App Engine
This is Rietveld 408576698