| 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 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2729 } else { | 2729 } else { |
| 2730 __ or_(TMP, left, right); | 2730 __ or_(TMP, left, right); |
| 2731 __ andi(CMPRES1, TMP, Immediate(kSmiTagMask)); | 2731 __ andi(CMPRES1, TMP, Immediate(kSmiTagMask)); |
| 2732 } | 2732 } |
| 2733 __ beq(CMPRES1, ZR, deopt); | 2733 __ beq(CMPRES1, ZR, deopt); |
| 2734 } | 2734 } |
| 2735 | 2735 |
| 2736 | 2736 |
| 2737 LocationSummary* BoxDoubleInstr::MakeLocationSummary() const { | 2737 LocationSummary* BoxDoubleInstr::MakeLocationSummary() const { |
| 2738 const intptr_t kNumInputs = 1; | 2738 const intptr_t kNumInputs = 1; |
| 2739 const intptr_t kNumTemps = 0; | 2739 const intptr_t kNumTemps = 1; |
| 2740 LocationSummary* summary = | 2740 LocationSummary* summary = |
| 2741 new LocationSummary(kNumInputs, | 2741 new LocationSummary(kNumInputs, |
| 2742 kNumTemps, | 2742 kNumTemps, |
| 2743 LocationSummary::kCallOnSlowPath); | 2743 LocationSummary::kCallOnSlowPath); |
| 2744 summary->set_in(0, Location::RequiresFpuRegister()); | 2744 summary->set_in(0, Location::RequiresFpuRegister()); |
| 2745 summary->set_temp(0, Location::RequiresRegister()); |
| 2745 summary->set_out(Location::RequiresRegister()); | 2746 summary->set_out(Location::RequiresRegister()); |
| 2746 return summary; | 2747 return summary; |
| 2747 } | 2748 } |
| 2748 | 2749 |
| 2749 | 2750 |
| 2750 class BoxDoubleSlowPath : public SlowPathCode { | 2751 class BoxDoubleSlowPath : public SlowPathCode { |
| 2751 public: | 2752 public: |
| 2752 explicit BoxDoubleSlowPath(BoxDoubleInstr* instruction) | 2753 explicit BoxDoubleSlowPath(BoxDoubleInstr* instruction) |
| 2753 : instruction_(instruction) { } | 2754 : instruction_(instruction) { } |
| 2754 | 2755 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2783 | 2784 |
| 2784 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2785 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2785 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); | 2786 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); |
| 2786 compiler->AddSlowPathCode(slow_path); | 2787 compiler->AddSlowPathCode(slow_path); |
| 2787 | 2788 |
| 2788 Register out_reg = locs()->out().reg(); | 2789 Register out_reg = locs()->out().reg(); |
| 2789 DRegister value = locs()->in(0).fpu_reg(); | 2790 DRegister value = locs()->in(0).fpu_reg(); |
| 2790 | 2791 |
| 2791 __ TryAllocate(compiler->double_class(), | 2792 __ TryAllocate(compiler->double_class(), |
| 2792 slow_path->entry_label(), | 2793 slow_path->entry_label(), |
| 2793 out_reg); | 2794 out_reg, |
| 2795 locs()->temp(0).reg()); |
| 2794 __ Bind(slow_path->exit_label()); | 2796 __ Bind(slow_path->exit_label()); |
| 2795 __ StoreDToOffset(value, out_reg, Double::value_offset() - kHeapObjectTag); | 2797 __ StoreDToOffset(value, out_reg, Double::value_offset() - kHeapObjectTag); |
| 2796 } | 2798 } |
| 2797 | 2799 |
| 2798 | 2800 |
| 2799 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { | 2801 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { |
| 2800 const intptr_t kNumInputs = 1; | 2802 const intptr_t kNumInputs = 1; |
| 2801 const intptr_t value_cid = value()->Type()->ToCid(); | 2803 const intptr_t value_cid = value()->Type()->ToCid(); |
| 2802 const bool needs_writable_input = (value_cid == kSmiCid); | 2804 const bool needs_writable_input = (value_cid == kSmiCid); |
| 2803 const intptr_t kNumTemps = 0; | 2805 const intptr_t kNumTemps = 0; |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3997 compiler->GenerateCall(token_pos(), | 3999 compiler->GenerateCall(token_pos(), |
| 3998 &label, | 4000 &label, |
| 3999 PcDescriptors::kOther, | 4001 PcDescriptors::kOther, |
| 4000 locs()); | 4002 locs()); |
| 4001 __ Drop(2); // Discard type arguments and receiver. | 4003 __ Drop(2); // Discard type arguments and receiver. |
| 4002 } | 4004 } |
| 4003 | 4005 |
| 4004 } // namespace dart | 4006 } // namespace dart |
| 4005 | 4007 |
| 4006 #endif // defined TARGET_ARCH_MIPS | 4008 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |