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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 4064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4075 __ minpd(left, right); | 4075 __ minpd(left, right); |
4076 break; | 4076 break; |
4077 case MethodRecognizer::kFloat64x2Max: | 4077 case MethodRecognizer::kFloat64x2Max: |
4078 __ maxpd(left, right); | 4078 __ maxpd(left, right); |
4079 break; | 4079 break; |
4080 default: UNREACHABLE(); | 4080 default: UNREACHABLE(); |
4081 } | 4081 } |
4082 } | 4082 } |
4083 | 4083 |
4084 | 4084 |
| 4085 LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary( |
| 4086 Isolate* isolate, bool opt) const { |
| 4087 const intptr_t kNumInputs = 4; |
| 4088 const intptr_t kNumTemps = 0; |
| 4089 LocationSummary* summary = new(isolate) LocationSummary( |
| 4090 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 4091 summary->set_in(0, Location::RequiresRegister()); |
| 4092 summary->set_in(1, Location::RequiresRegister()); |
| 4093 summary->set_in(2, Location::RequiresRegister()); |
| 4094 summary->set_in(3, Location::RequiresRegister()); |
| 4095 summary->set_out(0, Location::RequiresFpuRegister()); |
| 4096 return summary; |
| 4097 } |
| 4098 |
| 4099 |
| 4100 void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4101 Register v0 = locs()->in(0).reg(); |
| 4102 Register v1 = locs()->in(1).reg(); |
| 4103 Register v2 = locs()->in(2).reg(); |
| 4104 Register v3 = locs()->in(3).reg(); |
| 4105 XmmRegister result = locs()->out(0).fpu_reg(); |
| 4106 __ AddImmediate(RSP, Immediate(-4 * kInt32Size), PP); |
| 4107 __ movl(Address(RSP, 0 * kInt32Size), v0); |
| 4108 __ movl(Address(RSP, 1 * kInt32Size), v1); |
| 4109 __ movl(Address(RSP, 2 * kInt32Size), v2); |
| 4110 __ movl(Address(RSP, 3 * kInt32Size), v3); |
| 4111 __ movups(result, Address(RSP, 0)); |
| 4112 __ AddImmediate(RSP, Immediate(4 * kInt32Size), PP); |
| 4113 } |
| 4114 |
| 4115 |
4085 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 4116 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
4086 Isolate* isolate, bool opt) const { | 4117 Isolate* isolate, bool opt) const { |
4087 const intptr_t kNumInputs = 4; | 4118 const intptr_t kNumInputs = 4; |
4088 const intptr_t kNumTemps = 1; | 4119 const intptr_t kNumTemps = 1; |
4089 LocationSummary* summary = new(isolate) LocationSummary( | 4120 LocationSummary* summary = new(isolate) LocationSummary( |
4090 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4121 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
4091 summary->set_in(0, Location::RequiresRegister()); | 4122 summary->set_in(0, Location::RequiresRegister()); |
4092 summary->set_in(1, Location::RequiresRegister()); | 4123 summary->set_in(1, Location::RequiresRegister()); |
4093 summary->set_in(2, Location::RequiresRegister()); | 4124 summary->set_in(2, Location::RequiresRegister()); |
4094 summary->set_in(3, Location::RequiresRegister()); | 4125 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5485 } | 5516 } |
5486 | 5517 |
5487 | 5518 |
5488 void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5519 void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5489 UNIMPLEMENTED(); | 5520 UNIMPLEMENTED(); |
5490 } | 5521 } |
5491 | 5522 |
5492 | 5523 |
5493 LocationSummary* UnboxUint32Instr::MakeLocationSummary(Isolate* isolate, | 5524 LocationSummary* UnboxUint32Instr::MakeLocationSummary(Isolate* isolate, |
5494 bool opt) const { | 5525 bool opt) const { |
5495 UNIMPLEMENTED(); | 5526 const intptr_t kNumInputs = 1; |
5496 return NULL; | 5527 const intptr_t kNumTemps = 0; |
| 5528 LocationSummary* summary = new(isolate) LocationSummary( |
| 5529 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 5530 summary->set_in(0, Location::RequiresRegister()); |
| 5531 summary->set_out(0, Location::SameAsFirstInput()); |
| 5532 return summary; |
5497 } | 5533 } |
5498 | 5534 |
5499 | 5535 |
5500 void UnboxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5536 void UnboxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5501 UNIMPLEMENTED(); | 5537 const intptr_t value_cid = value()->Type()->ToCid(); |
| 5538 const Register value = locs()->in(0).reg(); |
| 5539 ASSERT(value == locs()->out(0).reg()); |
| 5540 |
| 5541 if (value_cid == kSmiCid) { |
| 5542 __ SmiUntag(value); |
| 5543 } else { |
| 5544 Label* deopt = compiler->AddDeoptStub(deopt_id_, |
| 5545 ICData::kDeoptUnboxInteger); |
| 5546 __ testq(value, Immediate(kSmiTagMask)); |
| 5547 __ j(NOT_ZERO, deopt); |
| 5548 __ SmiUntag(value); |
| 5549 } |
5502 } | 5550 } |
5503 | 5551 |
5504 | 5552 |
5505 LocationSummary* BoxUint32Instr::MakeLocationSummary(Isolate* isolate, | 5553 LocationSummary* BoxUint32Instr::MakeLocationSummary(Isolate* isolate, |
5506 bool opt) const { | 5554 bool opt) const { |
5507 UNIMPLEMENTED(); | 5555 UNIMPLEMENTED(); |
5508 return NULL; | 5556 return NULL; |
5509 } | 5557 } |
5510 | 5558 |
5511 | 5559 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5814 __ movq(R10, Immediate(kInvalidObjectPointer)); | 5862 __ movq(R10, Immediate(kInvalidObjectPointer)); |
5815 __ movq(RBX, Immediate(kInvalidObjectPointer)); | 5863 __ movq(RBX, Immediate(kInvalidObjectPointer)); |
5816 #endif | 5864 #endif |
5817 } | 5865 } |
5818 | 5866 |
5819 } // namespace dart | 5867 } // namespace dart |
5820 | 5868 |
5821 #undef __ | 5869 #undef __ |
5822 | 5870 |
5823 #endif // defined TARGET_ARCH_X64 | 5871 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |