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 4137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4148 __ minpd(left, right); | 4148 __ minpd(left, right); |
4149 break; | 4149 break; |
4150 case MethodRecognizer::kFloat64x2Max: | 4150 case MethodRecognizer::kFloat64x2Max: |
4151 __ maxpd(left, right); | 4151 __ maxpd(left, right); |
4152 break; | 4152 break; |
4153 default: UNREACHABLE(); | 4153 default: UNREACHABLE(); |
4154 } | 4154 } |
4155 } | 4155 } |
4156 | 4156 |
4157 | 4157 |
4158 LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary( | |
4159 Isolate* isolate, bool opt) const { | |
4160 const intptr_t kNumInputs = 4; | |
4161 const intptr_t kNumTemps = 0; | |
4162 LocationSummary* summary = new(isolate) LocationSummary( | |
4163 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | |
4164 summary->set_in(0, Location::RequiresRegister()); | |
4165 summary->set_in(1, Location::RequiresRegister()); | |
4166 summary->set_in(2, Location::RequiresRegister()); | |
4167 summary->set_in(3, Location::RequiresRegister()); | |
4168 summary->set_out(0, Location::RequiresFpuRegister()); | |
4169 return summary; | |
4170 } | |
4171 | |
4172 | |
4173 void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
4174 Register v0 = locs()->in(0).reg(); | |
4175 Register v1 = locs()->in(1).reg(); | |
4176 Register v2 = locs()->in(2).reg(); | |
4177 Register v3 = locs()->in(3).reg(); | |
4178 XmmRegister result = locs()->out(0).fpu_reg(); | |
4179 __ subl(ESP, Immediate(4 * kInt32Size)); | |
4180 __ movl(Address(ESP, 0 * kInt32Size), v0); | |
Vyacheslav Egorov (Google)
2014/08/15 11:02:05
For register use on ia32 it might have been better
| |
4181 __ movl(Address(ESP, 1 * kInt32Size), v1); | |
4182 __ movl(Address(ESP, 2 * kInt32Size), v2); | |
4183 __ movl(Address(ESP, 3 * kInt32Size), v3); | |
4184 __ movups(result, Address(ESP, 0)); | |
4185 __ addl(ESP, Immediate(4 * kInt32Size)); | |
4186 } | |
4187 | |
4188 | |
4158 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 4189 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
4159 Isolate* isolate, bool opt) const { | 4190 Isolate* isolate, bool opt) const { |
4160 const intptr_t kNumInputs = 4; | 4191 const intptr_t kNumInputs = 4; |
4161 const intptr_t kNumTemps = 0; | 4192 const intptr_t kNumTemps = 0; |
4162 LocationSummary* summary = new(isolate) LocationSummary( | 4193 LocationSummary* summary = new(isolate) LocationSummary( |
4163 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4194 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
4164 summary->set_in(0, Location::RequiresRegister()); | 4195 summary->set_in(0, Location::RequiresRegister()); |
4165 summary->set_in(1, Location::RequiresRegister()); | 4196 summary->set_in(1, Location::RequiresRegister()); |
4166 summary->set_in(2, Location::RequiresRegister()); | 4197 summary->set_in(2, Location::RequiresRegister()); |
4167 summary->set_in(3, Location::RequiresRegister()); | 4198 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6497 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 6528 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
6498 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 6529 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
6499 #endif | 6530 #endif |
6500 } | 6531 } |
6501 | 6532 |
6502 } // namespace dart | 6533 } // namespace dart |
6503 | 6534 |
6504 #undef __ | 6535 #undef __ |
6505 | 6536 |
6506 #endif // defined TARGET_ARCH_IA32 | 6537 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |