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 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2711 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2711 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2712 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); | 2712 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); |
2713 compiler->AddSlowPathCode(slow_path); | 2713 compiler->AddSlowPathCode(slow_path); |
2714 | 2714 |
2715 Register out_reg = locs()->out().reg(); | 2715 Register out_reg = locs()->out().reg(); |
2716 XmmRegister value = locs()->in(0).fpu_reg(); | 2716 XmmRegister value = locs()->in(0).fpu_reg(); |
2717 | 2717 |
2718 __ TryAllocate(compiler->double_class(), | 2718 __ TryAllocate(compiler->double_class(), |
2719 slow_path->entry_label(), | 2719 slow_path->entry_label(), |
2720 Assembler::kFarJump, | 2720 Assembler::kFarJump, |
2721 out_reg); | 2721 out_reg, |
| 2722 kNoRegister); |
2722 __ Bind(slow_path->exit_label()); | 2723 __ Bind(slow_path->exit_label()); |
2723 __ movsd(FieldAddress(out_reg, Double::value_offset()), value); | 2724 __ movsd(FieldAddress(out_reg, Double::value_offset()), value); |
2724 } | 2725 } |
2725 | 2726 |
2726 | 2727 |
2727 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { | 2728 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { |
2728 const intptr_t kNumInputs = 1; | 2729 const intptr_t kNumInputs = 1; |
2729 const intptr_t value_cid = value()->Type()->ToCid(); | 2730 const intptr_t value_cid = value()->Type()->ToCid(); |
2730 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid)); | 2731 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid)); |
2731 const bool needs_writable_input = (value_cid == kSmiCid); | 2732 const bool needs_writable_input = (value_cid == kSmiCid); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2818 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2819 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2819 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); | 2820 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); |
2820 compiler->AddSlowPathCode(slow_path); | 2821 compiler->AddSlowPathCode(slow_path); |
2821 | 2822 |
2822 Register out_reg = locs()->out().reg(); | 2823 Register out_reg = locs()->out().reg(); |
2823 XmmRegister value = locs()->in(0).fpu_reg(); | 2824 XmmRegister value = locs()->in(0).fpu_reg(); |
2824 | 2825 |
2825 __ TryAllocate(compiler->float32x4_class(), | 2826 __ TryAllocate(compiler->float32x4_class(), |
2826 slow_path->entry_label(), | 2827 slow_path->entry_label(), |
2827 Assembler::kFarJump, | 2828 Assembler::kFarJump, |
2828 out_reg); | 2829 out_reg, |
| 2830 kNoRegister); |
2829 __ Bind(slow_path->exit_label()); | 2831 __ Bind(slow_path->exit_label()); |
2830 __ movups(FieldAddress(out_reg, Float32x4::value_offset()), value); | 2832 __ movups(FieldAddress(out_reg, Float32x4::value_offset()), value); |
2831 } | 2833 } |
2832 | 2834 |
2833 | 2835 |
2834 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary() const { | 2836 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary() const { |
2835 const intptr_t value_cid = value()->Type()->ToCid(); | 2837 const intptr_t value_cid = value()->Type()->ToCid(); |
2836 const intptr_t kNumInputs = 1; | 2838 const intptr_t kNumInputs = 1; |
2837 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1; | 2839 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1; |
2838 LocationSummary* summary = | 2840 LocationSummary* summary = |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2912 void BoxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2914 void BoxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2913 BoxInt32x4SlowPath* slow_path = new BoxInt32x4SlowPath(this); | 2915 BoxInt32x4SlowPath* slow_path = new BoxInt32x4SlowPath(this); |
2914 compiler->AddSlowPathCode(slow_path); | 2916 compiler->AddSlowPathCode(slow_path); |
2915 | 2917 |
2916 Register out_reg = locs()->out().reg(); | 2918 Register out_reg = locs()->out().reg(); |
2917 XmmRegister value = locs()->in(0).fpu_reg(); | 2919 XmmRegister value = locs()->in(0).fpu_reg(); |
2918 | 2920 |
2919 __ TryAllocate(compiler->int32x4_class(), | 2921 __ TryAllocate(compiler->int32x4_class(), |
2920 slow_path->entry_label(), | 2922 slow_path->entry_label(), |
2921 Assembler::kFarJump, | 2923 Assembler::kFarJump, |
2922 out_reg); | 2924 out_reg, |
| 2925 kNoRegister); |
2923 __ Bind(slow_path->exit_label()); | 2926 __ Bind(slow_path->exit_label()); |
2924 __ movups(FieldAddress(out_reg, Int32x4::value_offset()), value); | 2927 __ movups(FieldAddress(out_reg, Int32x4::value_offset()), value); |
2925 } | 2928 } |
2926 | 2929 |
2927 | 2930 |
2928 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary() const { | 2931 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary() const { |
2929 const intptr_t value_cid = value()->Type()->ToCid(); | 2932 const intptr_t value_cid = value()->Type()->ToCid(); |
2930 const intptr_t kNumInputs = 1; | 2933 const intptr_t kNumInputs = 1; |
2931 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1; | 2934 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1; |
2932 LocationSummary* summary = | 2935 LocationSummary* summary = |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4364 | 4367 |
4365 __ SmiTag(EAX); | 4368 __ SmiTag(EAX); |
4366 __ movl(out_reg, EAX); | 4369 __ movl(out_reg, EAX); |
4367 __ jmp(&done); | 4370 __ jmp(&done); |
4368 | 4371 |
4369 __ Bind(¬_smi); | 4372 __ Bind(¬_smi); |
4370 __ TryAllocate( | 4373 __ TryAllocate( |
4371 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()), | 4374 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()), |
4372 slow_path->entry_label(), | 4375 slow_path->entry_label(), |
4373 Assembler::kFarJump, | 4376 Assembler::kFarJump, |
4374 out_reg); | 4377 out_reg, |
| 4378 kNoRegister); |
4375 __ Bind(slow_path->exit_label()); | 4379 __ Bind(slow_path->exit_label()); |
4376 __ movsd(FieldAddress(out_reg, Mint::value_offset()), value); | 4380 __ movsd(FieldAddress(out_reg, Mint::value_offset()), value); |
4377 __ Bind(&done); | 4381 __ Bind(&done); |
4378 } | 4382 } |
4379 | 4383 |
4380 | 4384 |
4381 LocationSummary* BinaryMintOpInstr::MakeLocationSummary() const { | 4385 LocationSummary* BinaryMintOpInstr::MakeLocationSummary() const { |
4382 const intptr_t kNumInputs = 2; | 4386 const intptr_t kNumInputs = 2; |
4383 switch (op_kind()) { | 4387 switch (op_kind()) { |
4384 case Token::kBIT_AND: | 4388 case Token::kBIT_AND: |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4967 PcDescriptors::kOther, | 4971 PcDescriptors::kOther, |
4968 locs()); | 4972 locs()); |
4969 __ Drop(2); // Discard type arguments and receiver. | 4973 __ Drop(2); // Discard type arguments and receiver. |
4970 } | 4974 } |
4971 | 4975 |
4972 } // namespace dart | 4976 } // namespace dart |
4973 | 4977 |
4974 #undef __ | 4978 #undef __ |
4975 | 4979 |
4976 #endif // defined TARGET_ARCH_IA32 | 4980 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |