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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 616873003: Use UnboxedInt32 and UnboxedUint32 representation for LoadIndexedInstr (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: runtime/vm/assembler_x64_test.cc
diff --git a/runtime/vm/assembler_x64_test.cc b/runtime/vm/assembler_x64_test.cc
index 1d599485f43ea62dbe548cb57d166f00569b4e59..254099c807911b57d3fd9a6d16bc56bfbde571da 100644
--- a/runtime/vm/assembler_x64_test.cc
+++ b/runtime/vm/assembler_x64_test.cc
@@ -2439,18 +2439,20 @@ ASSEMBLER_TEST_RUN(DoubleFPOperations, test) {
ASSEMBLER_TEST_GENERATE(Int32ToDoubleConversion, assembler) {
- __ movl(RDX, Immediate(6));
- __ cvtsi2sd(XMM0, RDX);
- __ movl(RDX, Immediate(8));
- __ cvtsi2sd(XMM8, RDX);
+ // Fill upper bits with garbage.
+ __ movq(RDX, Immediate(0x1111111100000006));
+ __ cvtsi2sd32(XMM0, RDX);
+ // Fill upper bits with garbage.
+ __ movq(RDX, Immediate(0x2222222200000008));
Vyacheslav Egorov (Google) 2014/10/09 19:08:58 maybe use another x64 register instead of RDX (e.g
Cutch 2014/10/09 20:48:22 Done.
+ __ cvtsi2sd32(XMM8, RDX);
__ subsd(XMM0, XMM8);
__ ret();
}
ASSEMBLER_TEST_RUN(Int32ToDoubleConversion, test) {
- typedef double (*IntToDoubleConversionCode)();
- double res = reinterpret_cast<IntToDoubleConversionCode>(test->entry())();
+ typedef double (*Int32ToDoubleConversion)();
+ double res = reinterpret_cast<Int32ToDoubleConversion>(test->entry())();
EXPECT_FLOAT_EQ(-2.0, res, 0.001);
}

Powered by Google App Engine
This is Rietveld 408576698