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

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 25092010: Adds the BreakpointRuntime stub to ARM and MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 bool needs_number_check, 1501 bool needs_number_check,
1502 intptr_t token_pos) { 1502 intptr_t token_pos) {
1503 __ TraceSimMsg("EqualityRegConstCompare"); 1503 __ TraceSimMsg("EqualityRegConstCompare");
1504 if (needs_number_check && 1504 if (needs_number_check &&
1505 (obj.IsMint() || obj.IsDouble() || obj.IsBigint())) { 1505 (obj.IsMint() || obj.IsDouble() || obj.IsBigint())) {
1506 __ addiu(SP, SP, Immediate(-2 * kWordSize)); 1506 __ addiu(SP, SP, Immediate(-2 * kWordSize));
1507 __ sw(reg, Address(SP, 1 * kWordSize)); 1507 __ sw(reg, Address(SP, 1 * kWordSize));
1508 __ LoadObject(TMP1, obj); 1508 __ LoadObject(TMP1, obj);
1509 __ sw(TMP1, Address(SP, 0 * kWordSize)); 1509 __ sw(TMP1, Address(SP, 0 * kWordSize));
1510 if (is_optimizing()) { 1510 if (is_optimizing()) {
1511 __ BranchLink(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); 1511 __ BranchLinkPatchable(
1512 &StubCode::OptimizedIdenticalWithNumberCheckLabel());
1512 } else { 1513 } else {
1513 __ BranchLink(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); 1514 __ BranchLinkPatchable(
1515 &StubCode::UnoptimizedIdenticalWithNumberCheckLabel());
1514 } 1516 }
1515 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, 1517 AddCurrentDescriptor(PcDescriptors::kRuntimeCall,
1516 Isolate::kNoDeoptId, 1518 Isolate::kNoDeoptId,
1517 token_pos); 1519 token_pos);
1518 __ TraceSimMsg("EqualityRegConstCompare return"); 1520 __ TraceSimMsg("EqualityRegConstCompare return");
1519 __ lw(reg, Address(SP, 1 * kWordSize)); // Restore 'reg'. 1521 __ lw(reg, Address(SP, 1 * kWordSize)); // Restore 'reg'.
1520 __ addiu(SP, SP, Immediate(2 * kWordSize)); // Discard constant. 1522 __ addiu(SP, SP, Immediate(2 * kWordSize)); // Discard constant.
1521 return; 1523 return;
1522 } 1524 }
1523 __ CompareObject(CMPRES1, CMPRES2, reg, obj); 1525 __ CompareObject(CMPRES1, CMPRES2, reg, obj);
1524 } 1526 }
1525 1527
1526 1528
1527 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, 1529 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
1528 Register right, 1530 Register right,
1529 bool needs_number_check, 1531 bool needs_number_check,
1530 intptr_t token_pos) { 1532 intptr_t token_pos) {
1531 __ TraceSimMsg("EqualityRegRegCompare"); 1533 __ TraceSimMsg("EqualityRegRegCompare");
1532 __ Comment("EqualityRegRegCompare"); 1534 __ Comment("EqualityRegRegCompare");
1533 if (needs_number_check) { 1535 if (needs_number_check) {
1534 __ addiu(SP, SP, Immediate(-2 * kWordSize)); 1536 __ addiu(SP, SP, Immediate(-2 * kWordSize));
1535 __ sw(left, Address(SP, 1 * kWordSize)); 1537 __ sw(left, Address(SP, 1 * kWordSize));
1536 __ sw(right, Address(SP, 0 * kWordSize)); 1538 __ sw(right, Address(SP, 0 * kWordSize));
1537 if (is_optimizing()) { 1539 if (is_optimizing()) {
1538 __ BranchLink(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); 1540 __ BranchLinkPatchable(
1541 &StubCode::OptimizedIdenticalWithNumberCheckLabel());
1539 } else { 1542 } else {
1540 __ BranchLink(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); 1543 __ BranchLinkPatchable(
1544 &StubCode::UnoptimizedIdenticalWithNumberCheckLabel());
1541 } 1545 }
1542 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, 1546 AddCurrentDescriptor(PcDescriptors::kRuntimeCall,
1543 Isolate::kNoDeoptId, 1547 Isolate::kNoDeoptId,
1544 token_pos); 1548 token_pos);
1545 __ TraceSimMsg("EqualityRegRegCompare return"); 1549 __ TraceSimMsg("EqualityRegRegCompare return");
1546 // Stub returns result in CMPRES. If it is 0, then left and right are equal. 1550 // Stub returns result in CMPRES. If it is 0, then left and right are equal.
1547 __ lw(right, Address(SP, 0 * kWordSize)); 1551 __ lw(right, Address(SP, 0 * kWordSize));
1548 __ lw(left, Address(SP, 1 * kWordSize)); 1552 __ lw(left, Address(SP, 1 * kWordSize));
1549 __ addiu(SP, SP, Immediate(2 * kWordSize)); 1553 __ addiu(SP, SP, Immediate(2 * kWordSize));
1550 } else { 1554 } else {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 __ AddImmediate(SP, kDoubleSize); 2012 __ AddImmediate(SP, kDoubleSize);
2009 } 2013 }
2010 2014
2011 2015
2012 #undef __ 2016 #undef __
2013 2017
2014 2018
2015 } // namespace dart 2019 } // namespace dart
2016 2020
2017 #endif // defined TARGET_ARCH_MIPS 2021 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698