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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 12334080: For Doubl erounding call C-function instead of attempting to inline it. Fixes issue 8760. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 19004)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -2081,42 +2081,6 @@
}
-void Assembler::DoubleRound(XmmRegister dst, XmmRegister src, XmmRegister tmp) {
- ASSERT(tmp != src);
- static double kZeroFiveConst = 0.5;
- static double kNegZeroFiveConst = -0.5;
- static double kOneConst = 1.0;
- static double kNegOneConst = -1.0;
- Label is_negative, round;
- if (src != dst) {
- movsd(dst, src);
- }
- // Special handling: 0.5 -> 1.0, -0.5 -> -1.0;
- Label done, equal_point5, equal_neg_point5;
- movq(TMP, Immediate(reinterpret_cast<intptr_t>(&kZeroFiveConst)));
- movsd(tmp, Address(TMP, 0));
- comisd(tmp, dst);
- j(EQUAL, &equal_point5, Assembler::kNearJump);
- movq(TMP, Immediate(reinterpret_cast<intptr_t>(&kNegZeroFiveConst)));
- movsd(tmp, Address(TMP, 0));
- comisd(tmp, dst);
- j(EQUAL, &equal_neg_point5, Assembler::kNearJump);
-
- roundsd(dst, dst, Assembler::kRoundToNearest);
- jmp(&done, Assembler::kNearJump);
-
- Bind(&equal_point5);
- movq(TMP, Immediate(reinterpret_cast<intptr_t>(&kOneConst)));
- movsd(dst, Address(TMP, 0));
- jmp(&done);
-
- Bind(&equal_neg_point5);
- movq(TMP, Immediate(reinterpret_cast<intptr_t>(&kNegOneConst)));
- movsd(dst, Address(TMP, 0));
- Bind(&done);
-}
-
-
void Assembler::Stop(const char* message) {
int64_t message_address = reinterpret_cast<int64_t>(message);
if (FLAG_print_stop_message) {
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698