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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2644 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2644 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2645 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); | 2645 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); |
2646 compiler->AddSlowPathCode(slow_path); | 2646 compiler->AddSlowPathCode(slow_path); |
2647 | 2647 |
2648 Register out_reg = locs()->out().reg(); | 2648 Register out_reg = locs()->out().reg(); |
2649 XmmRegister value = locs()->in(0).fpu_reg(); | 2649 XmmRegister value = locs()->in(0).fpu_reg(); |
2650 | 2650 |
2651 __ TryAllocate(compiler->double_class(), | 2651 __ TryAllocate(compiler->double_class(), |
2652 slow_path->entry_label(), | 2652 slow_path->entry_label(), |
2653 Assembler::kFarJump, | 2653 Assembler::kFarJump, |
2654 out_reg); | 2654 out_reg, |
| 2655 kNoRegister); |
2655 __ Bind(slow_path->exit_label()); | 2656 __ Bind(slow_path->exit_label()); |
2656 __ movsd(FieldAddress(out_reg, Double::value_offset()), value); | 2657 __ movsd(FieldAddress(out_reg, Double::value_offset()), value); |
2657 } | 2658 } |
2658 | 2659 |
2659 | 2660 |
2660 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { | 2661 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { |
2661 const intptr_t kNumInputs = 1; | 2662 const intptr_t kNumInputs = 1; |
2662 const intptr_t value_cid = value()->Type()->ToCid(); | 2663 const intptr_t value_cid = value()->Type()->ToCid(); |
2663 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid)); | 2664 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid)); |
2664 const bool needs_writable_input = (value_cid == kSmiCid); | 2665 const bool needs_writable_input = (value_cid == kSmiCid); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2751 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2752 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2752 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); | 2753 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); |
2753 compiler->AddSlowPathCode(slow_path); | 2754 compiler->AddSlowPathCode(slow_path); |
2754 | 2755 |
2755 Register out_reg = locs()->out().reg(); | 2756 Register out_reg = locs()->out().reg(); |
2756 XmmRegister value = locs()->in(0).fpu_reg(); | 2757 XmmRegister value = locs()->in(0).fpu_reg(); |
2757 | 2758 |
2758 __ TryAllocate(compiler->float32x4_class(), | 2759 __ TryAllocate(compiler->float32x4_class(), |
2759 slow_path->entry_label(), | 2760 slow_path->entry_label(), |
2760 Assembler::kFarJump, | 2761 Assembler::kFarJump, |
2761 out_reg); | 2762 out_reg, |
| 2763 kNoRegister); |
2762 __ Bind(slow_path->exit_label()); | 2764 __ Bind(slow_path->exit_label()); |
2763 __ movups(FieldAddress(out_reg, Float32x4::value_offset()), value); | 2765 __ movups(FieldAddress(out_reg, Float32x4::value_offset()), value); |
2764 } | 2766 } |
2765 | 2767 |
2766 | 2768 |
2767 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary() const { | 2769 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary() const { |
2768 const intptr_t value_cid = value()->Type()->ToCid(); | 2770 const intptr_t value_cid = value()->Type()->ToCid(); |
2769 const intptr_t kNumInputs = 1; | 2771 const intptr_t kNumInputs = 1; |
2770 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1; | 2772 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1; |
2771 LocationSummary* summary = | 2773 LocationSummary* summary = |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2845 void BoxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2847 void BoxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2846 BoxInt32x4SlowPath* slow_path = new BoxInt32x4SlowPath(this); | 2848 BoxInt32x4SlowPath* slow_path = new BoxInt32x4SlowPath(this); |
2847 compiler->AddSlowPathCode(slow_path); | 2849 compiler->AddSlowPathCode(slow_path); |
2848 | 2850 |
2849 Register out_reg = locs()->out().reg(); | 2851 Register out_reg = locs()->out().reg(); |
2850 XmmRegister value = locs()->in(0).fpu_reg(); | 2852 XmmRegister value = locs()->in(0).fpu_reg(); |
2851 | 2853 |
2852 __ TryAllocate(compiler->int32x4_class(), | 2854 __ TryAllocate(compiler->int32x4_class(), |
2853 slow_path->entry_label(), | 2855 slow_path->entry_label(), |
2854 Assembler::kFarJump, | 2856 Assembler::kFarJump, |
2855 out_reg); | 2857 out_reg, |
| 2858 kNoRegister); |
2856 __ Bind(slow_path->exit_label()); | 2859 __ Bind(slow_path->exit_label()); |
2857 __ movups(FieldAddress(out_reg, Int32x4::value_offset()), value); | 2860 __ movups(FieldAddress(out_reg, Int32x4::value_offset()), value); |
2858 } | 2861 } |
2859 | 2862 |
2860 | 2863 |
2861 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary() const { | 2864 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary() const { |
2862 const intptr_t value_cid = value()->Type()->ToCid(); | 2865 const intptr_t value_cid = value()->Type()->ToCid(); |
2863 const intptr_t kNumInputs = 1; | 2866 const intptr_t kNumInputs = 1; |
2864 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1; | 2867 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1; |
2865 LocationSummary* summary = | 2868 LocationSummary* summary = |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4447 | 4450 |
4448 __ SmiTag(EAX); | 4451 __ SmiTag(EAX); |
4449 __ movl(out_reg, EAX); | 4452 __ movl(out_reg, EAX); |
4450 __ jmp(&done); | 4453 __ jmp(&done); |
4451 | 4454 |
4452 __ Bind(¬_smi); | 4455 __ Bind(¬_smi); |
4453 __ TryAllocate( | 4456 __ TryAllocate( |
4454 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()), | 4457 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()), |
4455 slow_path->entry_label(), | 4458 slow_path->entry_label(), |
4456 Assembler::kFarJump, | 4459 Assembler::kFarJump, |
4457 out_reg); | 4460 out_reg, |
| 4461 kNoRegister); |
4458 __ Bind(slow_path->exit_label()); | 4462 __ Bind(slow_path->exit_label()); |
4459 __ movsd(FieldAddress(out_reg, Mint::value_offset()), value); | 4463 __ movsd(FieldAddress(out_reg, Mint::value_offset()), value); |
4460 __ Bind(&done); | 4464 __ Bind(&done); |
4461 } | 4465 } |
4462 | 4466 |
4463 | 4467 |
4464 LocationSummary* BinaryMintOpInstr::MakeLocationSummary() const { | 4468 LocationSummary* BinaryMintOpInstr::MakeLocationSummary() const { |
4465 const intptr_t kNumInputs = 2; | 4469 const intptr_t kNumInputs = 2; |
4466 switch (op_kind()) { | 4470 switch (op_kind()) { |
4467 case Token::kBIT_AND: | 4471 case Token::kBIT_AND: |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5006 PcDescriptors::kOther, | 5010 PcDescriptors::kOther, |
5007 locs()); | 5011 locs()); |
5008 __ Drop(2); // Discard type arguments and receiver. | 5012 __ Drop(2); // Discard type arguments and receiver. |
5009 } | 5013 } |
5010 | 5014 |
5011 } // namespace dart | 5015 } // namespace dart |
5012 | 5016 |
5013 #undef __ | 5017 #undef __ |
5014 | 5018 |
5015 #endif // defined TARGET_ARCH_IA32 | 5019 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |