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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 10534116: Implement kDoubleToDouble and kIntegerToDouble on ia32 and x64. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64_test.cc
diff --git a/runtime/vm/assembler_x64_test.cc b/runtime/vm/assembler_x64_test.cc
index 1b327e40c901e4c3b05652dc790c09eaf895ba7d..8f1aa927dfececde5726c58225072dc99b03d8c2 100644
--- a/runtime/vm/assembler_x64_test.cc
+++ b/runtime/vm/assembler_x64_test.cc
@@ -1107,20 +1107,34 @@ ASSEMBLER_TEST_RUN(DoubleFPOperations, entry) {
}
-ASSEMBLER_TEST_GENERATE(IntToDoubleConversion, assembler) {
+ASSEMBLER_TEST_GENERATE(Int32ToDoubleConversion, assembler) {
__ movl(RDX, Immediate(6));
__ cvtsi2sd(XMM0, RDX);
__ ret();
}
-ASSEMBLER_TEST_RUN(IntToDoubleConversion, entry) {
+ASSEMBLER_TEST_RUN(Int32ToDoubleConversion, entry) {
typedef double (*IntToDoubleConversionCode)();
double res = reinterpret_cast<IntToDoubleConversionCode>(entry)();
EXPECT_FLOAT_EQ(6.0, res, 0.001);
}
+ASSEMBLER_TEST_GENERATE(Int64ToDoubleConversion, assembler) {
+ __ movq(RDX, Immediate(12LL << 32));
+ __ cvtsi2sd(XMM0, RDX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Int64ToDoubleConversion, entry) {
+ typedef double (*IntToDoubleConversionCode)();
+ double res = reinterpret_cast<IntToDoubleConversionCode>(entry)();
+ EXPECT_FLOAT_EQ(static_cast<double>(12LL << 32), res, 0.001);
+}
+
+
ASSEMBLER_TEST_GENERATE(TestObjectCompare, assembler) {
ObjectStore* object_store = Isolate::Current()->object_store();
const Object& obj = Object::ZoneHandle(object_store->smi_class());
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698