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

Unified Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 62133002: Cleanup of branch code generation (no change in functionality). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 7 years, 1 month 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/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_mips.cc
===================================================================
--- runtime/vm/flow_graph_compiler_mips.cc (revision 30039)
+++ runtime/vm/flow_graph_compiler_mips.cc (working copy)
@@ -1666,82 +1666,6 @@
}
-void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition,
- FpuRegister left,
- FpuRegister right,
- BranchInstr* branch) {
- ASSERT(branch != NULL);
- __ Comment("DoubleCompareBranch");
- assembler()->cund(left, right);
- BlockEntryInstr* nan_result = (true_condition == NE) ?
- branch->true_successor() : branch->false_successor();
- assembler()->bc1t(GetJumpLabel(nan_result));
-
- switch (true_condition) {
- case EQ: assembler()->ceqd(left, right); break;
- case NE: assembler()->ceqd(left, right); break;
- case LT: assembler()->coltd(left, right); break;
- case LE: assembler()->coled(left, right); break;
- case GT: assembler()->coltd(right, left); break;
- case GE: assembler()->coled(right, left); break;
- default: {
- // Should only passing the above conditions to this function.
- UNREACHABLE();
- break;
- }
- }
-
- assembler()->LoadImmediate(TMP, 1);
- if (true_condition == NE) {
- assembler()->movf(CMPRES1, ZR);
- assembler()->movt(CMPRES1, TMP);
- } else {
- assembler()->movf(CMPRES1, TMP);
- assembler()->movt(CMPRES1, ZR);
- }
- assembler()->mov(CMPRES2, ZR);
-
- // EmitBranchOnCondition expects ordering to be described by CMPRES1, CMPRES2.
- branch->EmitBranchOnCondition(this, EQ);
-}
-
-
-void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition,
- FpuRegister left,
- FpuRegister right,
- Register result) {
- Label done, is_true;
- Label* nan_label = (true_condition == NE) ? &is_true : &done;
- __ Comment("DoubleCompareBool");
- assembler()->LoadObject(result, Bool::False());
- assembler()->cund(left, right);
- assembler()->bc1t(nan_label);
-
- switch (true_condition) {
- case EQ: assembler()->ceqd(left, right); break;
- case NE: assembler()->ceqd(left, right); break;
- case LT: assembler()->coltd(left, right); break;
- case LE: assembler()->coled(left, right); break;
- case GT: assembler()->coltd(right, left); break;
- case GE: assembler()->coled(right, left); break;
- default: {
- // Should only passing the above conditions to this function.
- UNREACHABLE();
- break;
- }
- }
-
- if (true_condition == NE) {
- assembler()->bc1t(&done); // False is already in result.
- } else {
- assembler()->bc1f(&done);
- }
- assembler()->Bind(&is_true);
- assembler()->LoadObject(result, Bool::True());
- assembler()->Bind(&done);
-}
-
-
FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
intptr_t index_scale,
Register array,
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698