| OLD | NEW |
| 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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 } else { | 2646 } else { |
| 2647 __ or_(TMP, left, right); | 2647 __ or_(TMP, left, right); |
| 2648 __ andi(CMPRES1, TMP, Immediate(kSmiTagMask)); | 2648 __ andi(CMPRES1, TMP, Immediate(kSmiTagMask)); |
| 2649 } | 2649 } |
| 2650 __ beq(CMPRES1, ZR, deopt); | 2650 __ beq(CMPRES1, ZR, deopt); |
| 2651 } | 2651 } |
| 2652 | 2652 |
| 2653 | 2653 |
| 2654 LocationSummary* BoxDoubleInstr::MakeLocationSummary() const { | 2654 LocationSummary* BoxDoubleInstr::MakeLocationSummary() const { |
| 2655 const intptr_t kNumInputs = 1; | 2655 const intptr_t kNumInputs = 1; |
| 2656 const intptr_t kNumTemps = 0; | 2656 const intptr_t kNumTemps = 1; |
| 2657 LocationSummary* summary = | 2657 LocationSummary* summary = |
| 2658 new LocationSummary(kNumInputs, | 2658 new LocationSummary(kNumInputs, |
| 2659 kNumTemps, | 2659 kNumTemps, |
| 2660 LocationSummary::kCallOnSlowPath); | 2660 LocationSummary::kCallOnSlowPath); |
| 2661 summary->set_in(0, Location::RequiresFpuRegister()); | 2661 summary->set_in(0, Location::RequiresFpuRegister()); |
| 2662 summary->set_temp(0, Location::RequiresRegister()); |
| 2662 summary->set_out(Location::RequiresRegister()); | 2663 summary->set_out(Location::RequiresRegister()); |
| 2663 return summary; | 2664 return summary; |
| 2664 } | 2665 } |
| 2665 | 2666 |
| 2666 | 2667 |
| 2667 class BoxDoubleSlowPath : public SlowPathCode { | 2668 class BoxDoubleSlowPath : public SlowPathCode { |
| 2668 public: | 2669 public: |
| 2669 explicit BoxDoubleSlowPath(BoxDoubleInstr* instruction) | 2670 explicit BoxDoubleSlowPath(BoxDoubleInstr* instruction) |
| 2670 : instruction_(instruction) { } | 2671 : instruction_(instruction) { } |
| 2671 | 2672 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2700 | 2701 |
| 2701 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2702 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2702 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); | 2703 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); |
| 2703 compiler->AddSlowPathCode(slow_path); | 2704 compiler->AddSlowPathCode(slow_path); |
| 2704 | 2705 |
| 2705 Register out_reg = locs()->out().reg(); | 2706 Register out_reg = locs()->out().reg(); |
| 2706 DRegister value = locs()->in(0).fpu_reg(); | 2707 DRegister value = locs()->in(0).fpu_reg(); |
| 2707 | 2708 |
| 2708 __ TryAllocate(compiler->double_class(), | 2709 __ TryAllocate(compiler->double_class(), |
| 2709 slow_path->entry_label(), | 2710 slow_path->entry_label(), |
| 2710 out_reg); | 2711 out_reg, |
| 2712 locs()->temp(0).reg()); |
| 2711 __ Bind(slow_path->exit_label()); | 2713 __ Bind(slow_path->exit_label()); |
| 2712 __ StoreDToOffset(value, out_reg, Double::value_offset() - kHeapObjectTag); | 2714 __ StoreDToOffset(value, out_reg, Double::value_offset() - kHeapObjectTag); |
| 2713 } | 2715 } |
| 2714 | 2716 |
| 2715 | 2717 |
| 2716 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { | 2718 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { |
| 2717 const intptr_t kNumInputs = 1; | 2719 const intptr_t kNumInputs = 1; |
| 2718 const intptr_t value_cid = value()->Type()->ToCid(); | 2720 const intptr_t value_cid = value()->Type()->ToCid(); |
| 2719 const bool needs_writable_input = (value_cid == kSmiCid); | 2721 const bool needs_writable_input = (value_cid == kSmiCid); |
| 2720 const intptr_t kNumTemps = 0; | 2722 const intptr_t kNumTemps = 0; |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3987 compiler->GenerateCall(token_pos(), | 3989 compiler->GenerateCall(token_pos(), |
| 3988 &label, | 3990 &label, |
| 3989 PcDescriptors::kOther, | 3991 PcDescriptors::kOther, |
| 3990 locs()); | 3992 locs()); |
| 3991 __ Drop(2); // Discard type arguments and receiver. | 3993 __ Drop(2); // Discard type arguments and receiver. |
| 3992 } | 3994 } |
| 3993 | 3995 |
| 3994 } // namespace dart | 3996 } // namespace dart |
| 3995 | 3997 |
| 3996 #endif // defined TARGET_ARCH_MIPS | 3998 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |