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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 21307004: Implement some conditional moves instructions for ia32/x64. Use them in MinMax instruction implemen… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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_test.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 25648)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -3686,6 +3686,7 @@
summary->set_temp(0, Location::RequiresRegister());
return summary;
}
+
ASSERT(result_cid() == kSmiCid);
const intptr_t kNumInputs = 2;
const intptr_t kNumTemps = 0;
@@ -3746,20 +3747,17 @@
return;
}
- Label done;
ASSERT(result_cid() == kSmiCid);
Register left = locs()->in(0).reg();
Register right = locs()->in(1).reg();
Register result = locs()->out().reg();
__ cmpl(left, right);
+ ASSERT(result == left);
if (is_min) {
- ASSERT(result == left);
- __ j(LESS_EQUAL, &done, Assembler::kNearJump);
+ __ cmovgel(result, right);
} else {
- __ j(GREATER_EQUAL, &done, Assembler::kNearJump);
+ __ cmovlessl(result, right);
}
- __ movl(result, right);
- __ Bind(&done);
}
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698