OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3932 __ vmind(out, left, right); | 3932 __ vmind(out, left, right); |
3933 break; | 3933 break; |
3934 case MethodRecognizer::kFloat64x2Max: | 3934 case MethodRecognizer::kFloat64x2Max: |
3935 __ vmaxd(out, left, right); | 3935 __ vmaxd(out, left, right); |
3936 break; | 3936 break; |
3937 default: UNREACHABLE(); | 3937 default: UNREACHABLE(); |
3938 } | 3938 } |
3939 } | 3939 } |
3940 | 3940 |
3941 | 3941 |
| 3942 LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary( |
| 3943 Isolate* isolate, bool opt) const { |
| 3944 const intptr_t kNumInputs = 4; |
| 3945 const intptr_t kNumTemps = 0; |
| 3946 LocationSummary* summary = new(isolate) LocationSummary( |
| 3947 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3948 summary->set_in(0, Location::RequiresRegister()); |
| 3949 summary->set_in(1, Location::RequiresRegister()); |
| 3950 summary->set_in(2, Location::RequiresRegister()); |
| 3951 summary->set_in(3, Location::RequiresRegister()); |
| 3952 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3953 return summary; |
| 3954 } |
| 3955 |
| 3956 |
| 3957 void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3958 const Register v0 = locs()->in(0).reg(); |
| 3959 const Register v1 = locs()->in(1).reg(); |
| 3960 const Register v2 = locs()->in(2).reg(); |
| 3961 const Register v3 = locs()->in(3).reg(); |
| 3962 const VRegister result = locs()->out(0).fpu_reg(); |
| 3963 __ veor(result, result, result); |
| 3964 __ vinsw(result, 0, v0); |
| 3965 __ vinsw(result, 1, v1); |
| 3966 __ vinsw(result, 2, v2); |
| 3967 __ vinsw(result, 3, v3); |
| 3968 } |
| 3969 |
| 3970 |
3942 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 3971 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
3943 Isolate* isolate, bool opt) const { | 3972 Isolate* isolate, bool opt) const { |
3944 const intptr_t kNumInputs = 4; | 3973 const intptr_t kNumInputs = 4; |
3945 const intptr_t kNumTemps = 1; | 3974 const intptr_t kNumTemps = 1; |
3946 LocationSummary* summary = new LocationSummary( | 3975 LocationSummary* summary = new LocationSummary( |
3947 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3976 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
3948 summary->set_in(0, Location::RequiresRegister()); | 3977 summary->set_in(0, Location::RequiresRegister()); |
3949 summary->set_in(1, Location::RequiresRegister()); | 3978 summary->set_in(1, Location::RequiresRegister()); |
3950 summary->set_in(2, Location::RequiresRegister()); | 3979 summary->set_in(2, Location::RequiresRegister()); |
3951 summary->set_in(3, Location::RequiresRegister()); | 3980 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5121 } | 5150 } |
5122 | 5151 |
5123 | 5152 |
5124 void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5153 void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5125 UNIMPLEMENTED(); | 5154 UNIMPLEMENTED(); |
5126 } | 5155 } |
5127 | 5156 |
5128 | 5157 |
5129 LocationSummary* UnboxUint32Instr::MakeLocationSummary(Isolate* isolate, | 5158 LocationSummary* UnboxUint32Instr::MakeLocationSummary(Isolate* isolate, |
5130 bool opt) const { | 5159 bool opt) const { |
5131 UNIMPLEMENTED(); | 5160 const intptr_t kNumInputs = 1; |
5132 return NULL; | 5161 const intptr_t kNumTemps = 0; |
| 5162 LocationSummary* summary = new(isolate) LocationSummary( |
| 5163 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 5164 summary->set_in(0, Location::RequiresRegister()); |
| 5165 summary->set_out(0, Location::SameAsFirstInput()); |
| 5166 return summary; |
5133 } | 5167 } |
5134 | 5168 |
5135 | 5169 |
5136 void UnboxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5170 void UnboxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5137 UNIMPLEMENTED(); | 5171 const intptr_t value_cid = value()->Type()->ToCid(); |
| 5172 const Register value = locs()->in(0).reg(); |
| 5173 ASSERT(value == locs()->out(0).reg()); |
| 5174 |
| 5175 if (value_cid == kSmiCid) { |
| 5176 __ SmiUntag(value); |
| 5177 } else { |
| 5178 Label* deopt = compiler->AddDeoptStub(deopt_id_, |
| 5179 ICData::kDeoptUnboxInteger); |
| 5180 __ tsti(value, kSmiTagMask); |
| 5181 __ b(deopt, NE); |
| 5182 __ SmiUntag(value); |
| 5183 } |
5138 } | 5184 } |
5139 | 5185 |
5140 | 5186 |
5141 LocationSummary* BoxUint32Instr::MakeLocationSummary(Isolate* isolate, | 5187 LocationSummary* BoxUint32Instr::MakeLocationSummary(Isolate* isolate, |
5142 bool opt) const { | 5188 bool opt) const { |
5143 UNIMPLEMENTED(); | 5189 UNIMPLEMENTED(); |
5144 return NULL; | 5190 return NULL; |
5145 } | 5191 } |
5146 | 5192 |
5147 | 5193 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5396 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 5442 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
5397 #if defined(DEBUG) | 5443 #if defined(DEBUG) |
5398 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | 5444 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
5399 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | 5445 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); |
5400 #endif | 5446 #endif |
5401 } | 5447 } |
5402 | 5448 |
5403 } // namespace dart | 5449 } // namespace dart |
5404 | 5450 |
5405 #endif // defined TARGET_ARCH_ARM64 | 5451 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |