Index: runtime/vm/intermediate_language_x64.cc |
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc |
index e9db8d86521273ddf1c1dff6b307f853d81a45a8..b63937fd3332c608077b8b767e1ddc2aad67cc84 100644 |
--- a/runtime/vm/intermediate_language_x64.cc |
+++ b/runtime/vm/intermediate_language_x64.cc |
@@ -34,7 +34,6 @@ LocationSummary* Instruction::MakeCallSummary(Zone* zone) { |
return result; |
} |
- |
LocationSummary* PushArgumentInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -45,7 +44,6 @@ LocationSummary* PushArgumentInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// In SSA mode, we need an explicit push. Nothing to do in non-SSA mode |
// where PushArgument is handled by BindInstr::EmitNativeCode. |
@@ -62,7 +60,6 @@ void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* ReturnInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
const intptr_t kNumInputs = 1; |
const intptr_t kNumTemps = 0; |
@@ -72,7 +69,6 @@ LocationSummary* ReturnInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return locs; |
} |
- |
// Attempt optimized compilation at return instruction instead of at the entry. |
// The entry needs to be patchable, no inlined objects are allowed in the area |
// that will be overwritten by the patch instruction: a jump). |
@@ -107,7 +103,6 @@ void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ set_constant_pool_allowed(true); |
} |
- |
static Condition NegateCondition(Condition condition) { |
switch (condition) { |
case EQUAL: |
@@ -140,14 +135,12 @@ static Condition NegateCondition(Condition condition) { |
} |
} |
- |
// Detect pattern when one value is zero and another is a power of 2. |
static bool IsPowerOfTwoKind(intptr_t v1, intptr_t v2) { |
return (Utils::IsPowerOfTwo(v1) && (v2 == 0)) || |
(Utils::IsPowerOfTwo(v2) && (v1 == 0)); |
} |
- |
LocationSummary* IfThenElseInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
comparison()->InitializeLocationSummary(zone, opt); |
@@ -156,7 +149,6 @@ LocationSummary* IfThenElseInstr::MakeLocationSummary(Zone* zone, |
return comparison()->locs(); |
} |
- |
void IfThenElseInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->out(0).reg() == RDX); |
@@ -208,7 +200,6 @@ void IfThenElseInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* LoadLocalInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 0; |
@@ -220,13 +211,11 @@ LocationSummary* LoadLocalInstr::MakeLocationSummary(Zone* zone, |
LocationSummary::kNoCall); |
} |
- |
void LoadLocalInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(!compiler->is_optimizing()); |
// Nothing to do. |
} |
- |
LocationSummary* StoreLocalInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -234,7 +223,6 @@ LocationSummary* StoreLocalInstr::MakeLocationSummary(Zone* zone, |
LocationSummary::kNoCall); |
} |
- |
void StoreLocalInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
Register result = locs()->out(0).reg(); |
@@ -242,7 +230,6 @@ void StoreLocalInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ movq(Address(RBP, local().index() * kWordSize), value); |
} |
- |
LocationSummary* ConstantInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 0; |
@@ -253,7 +240,6 @@ LocationSummary* ConstantInstr::MakeLocationSummary(Zone* zone, |
LocationSummary::kNoCall); |
} |
- |
void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// The register allocator drops constant definitions that have no uses. |
Location out = locs()->out(0); |
@@ -264,7 +250,6 @@ void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 0; |
@@ -285,7 +270,6 @@ LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// The register allocator drops constant definitions that have no uses. |
if (!locs()->out(0).IsInvalid()) { |
@@ -310,7 +294,6 @@ void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 3; |
@@ -324,7 +307,6 @@ LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -336,7 +318,6 @@ LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
static void EmitAssertBoolean(Register reg, |
TokenPosition token_pos, |
intptr_t deopt_id, |
@@ -366,7 +347,6 @@ static void EmitAssertBoolean(Register reg, |
__ Bind(&done); |
} |
- |
void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register obj = locs()->in(0).reg(); |
Register result = locs()->out(0).reg(); |
@@ -375,7 +355,6 @@ void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(obj == result); |
} |
- |
static Condition TokenKindToIntCondition(Token::Kind kind) { |
switch (kind) { |
case Token::kEQ: |
@@ -396,7 +375,6 @@ static Condition TokenKindToIntCondition(Token::Kind kind) { |
} |
} |
- |
LocationSummary* EqualityCompareInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -436,7 +414,6 @@ LocationSummary* EqualityCompareInstr::MakeLocationSummary(Zone* zone, |
return NULL; |
} |
- |
static void LoadValueCid(FlowGraphCompiler* compiler, |
Register value_cid_reg, |
Register value_reg, |
@@ -455,7 +432,6 @@ static void LoadValueCid(FlowGraphCompiler* compiler, |
__ Bind(&done); |
} |
- |
static Condition FlipCondition(Condition condition) { |
switch (condition) { |
case EQUAL: |
@@ -484,7 +460,6 @@ static Condition FlipCondition(Condition condition) { |
} |
} |
- |
static void EmitBranchOnCondition(FlowGraphCompiler* compiler, |
Condition true_condition, |
BranchLabels labels) { |
@@ -503,7 +478,6 @@ static void EmitBranchOnCondition(FlowGraphCompiler* compiler, |
} |
} |
- |
static Condition EmitInt64ComparisonOp(FlowGraphCompiler* compiler, |
const LocationSummary& locs, |
Token::Kind kind) { |
@@ -526,7 +500,6 @@ static Condition EmitInt64ComparisonOp(FlowGraphCompiler* compiler, |
return true_condition; |
} |
- |
static Condition TokenKindToDoubleCondition(Token::Kind kind) { |
switch (kind) { |
case Token::kEQ: |
@@ -547,7 +520,6 @@ static Condition TokenKindToDoubleCondition(Token::Kind kind) { |
} |
} |
- |
static Condition EmitDoubleComparisonOp(FlowGraphCompiler* compiler, |
const LocationSummary& locs, |
Token::Kind kind, |
@@ -564,7 +536,6 @@ static Condition EmitDoubleComparisonOp(FlowGraphCompiler* compiler, |
return true_condition; |
} |
- |
Condition EqualityCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
BranchLabels labels) { |
if ((operation_cid() == kSmiCid) || (operation_cid() == kMintCid)) { |
@@ -575,7 +546,6 @@ Condition EqualityCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
} |
} |
- |
void ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Label is_true, is_false; |
BranchLabels labels = {&is_true, &is_false, &is_false}; |
@@ -594,7 +564,6 @@ void ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&done); |
} |
- |
void ComparisonInstr::EmitBranchCode(FlowGraphCompiler* compiler, |
BranchInstr* branch) { |
BranchLabels labels = compiler->CreateBranchLabels(branch); |
@@ -604,7 +573,6 @@ void ComparisonInstr::EmitBranchCode(FlowGraphCompiler* compiler, |
} |
} |
- |
LocationSummary* TestSmiInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
const intptr_t kNumInputs = 2; |
const intptr_t kNumTemps = 0; |
@@ -617,7 +585,6 @@ LocationSummary* TestSmiInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return locs; |
} |
- |
Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
BranchLabels labels) { |
Register left_reg = locs()->in(0).reg(); |
@@ -633,7 +600,6 @@ Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
return true_condition; |
} |
- |
LocationSummary* TestCidsInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -646,18 +612,16 @@ LocationSummary* TestCidsInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
BranchLabels labels) { |
ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); |
Register val_reg = locs()->in(0).reg(); |
Register cid_reg = locs()->temp(0).reg(); |
- Label* deopt = |
- CanDeoptimize() |
- ? compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids, |
- licm_hoisted_ ? ICData::kHoisted : 0) |
- : NULL; |
+ Label* deopt = CanDeoptimize() ? compiler->AddDeoptStub( |
+ deopt_id(), ICData::kDeoptTestCids, |
+ licm_hoisted_ ? ICData::kHoisted : 0) |
+ : NULL; |
const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0; |
const ZoneGrowableArray<intptr_t>& data = cid_results(); |
@@ -690,7 +654,6 @@ Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
return INVALID_CONDITION; |
} |
- |
LocationSummary* RelationalOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -723,7 +686,6 @@ LocationSummary* RelationalOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
Condition RelationalOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
BranchLabels labels) { |
if ((operation_cid() == kSmiCid) || (operation_cid() == kMintCid)) { |
@@ -734,13 +696,11 @@ Condition RelationalOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
} |
} |
- |
LocationSummary* NativeCallInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
return MakeCallSummary(zone); |
} |
- |
void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
SetupNative(); |
Register result = locs()->out(0).reg(); |
@@ -780,7 +740,6 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ popq(result); |
} |
- |
static bool CanBeImmediateIndex(Value* index, intptr_t cid) { |
if (!index->definition()->IsConstant()) return false; |
const Object& constant = index->definition()->AsConstant()->value(); |
@@ -792,7 +751,6 @@ static bool CanBeImmediateIndex(Value* index, intptr_t cid) { |
return Utils::IsInt(32, disp); |
} |
- |
LocationSummary* OneByteStringFromCharCodeInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -802,7 +760,6 @@ LocationSummary* OneByteStringFromCharCodeInstr::MakeLocationSummary( |
LocationSummary::kNoCall); |
} |
- |
void OneByteStringFromCharCodeInstr::EmitNativeCode( |
FlowGraphCompiler* compiler) { |
ASSERT(compiler->is_optimizing()); |
@@ -815,7 +772,6 @@ void OneByteStringFromCharCodeInstr::EmitNativeCode( |
Symbols::kNullCharCodeSymbolOffset * kWordSize)); |
} |
- |
LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -823,7 +779,6 @@ LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, |
LocationSummary::kNoCall); |
} |
- |
void StringToCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(cid_ == kOneByteStringCid); |
Register str = locs()->in(0).reg(); |
@@ -840,7 +795,6 @@ void StringToCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&done); |
} |
- |
LocationSummary* StringInterpolateInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -852,7 +806,6 @@ LocationSummary* StringInterpolateInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register array = locs()->in(0).reg(); |
__ pushq(array); |
@@ -865,7 +818,6 @@ void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->out(0).reg() == RAX); |
} |
- |
LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -873,7 +825,6 @@ LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, |
LocationSummary::kNoCall); |
} |
- |
void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register obj = locs()->in(0).reg(); |
Register result = locs()->out(0).reg(); |
@@ -885,7 +836,6 @@ void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -893,7 +843,6 @@ LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone, |
LocationSummary::kNoCall); |
} |
- |
void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Register object = locs()->in(0).reg(); |
const Register result = locs()->out(0).reg(); |
@@ -918,7 +867,6 @@ void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
CompileType LoadIndexedInstr::ComputeType() const { |
switch (class_id_) { |
case kArrayCid: |
@@ -959,7 +907,6 @@ CompileType LoadIndexedInstr::ComputeType() const { |
} |
} |
- |
Representation LoadIndexedInstr::representation() const { |
switch (class_id_) { |
case kArrayCid: |
@@ -997,7 +944,6 @@ Representation LoadIndexedInstr::representation() const { |
} |
} |
- |
LocationSummary* LoadIndexedInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -1029,7 +975,6 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// The array register points to the backing store for external arrays. |
const Register array = locs()->in(0).reg(); |
@@ -1134,7 +1079,6 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* LoadCodeUnitsInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -1150,7 +1094,6 @@ LocationSummary* LoadCodeUnitsInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// The string register points to the backing store for external strings. |
const Register str = locs()->in(0).reg(); |
@@ -1201,7 +1144,6 @@ void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
Representation StoreIndexedInstr::RequiredInputRepresentation( |
intptr_t idx) const { |
if (idx == 0) return kNoRepresentation; |
@@ -1239,7 +1181,6 @@ Representation StoreIndexedInstr::RequiredInputRepresentation( |
} |
} |
- |
LocationSummary* StoreIndexedInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 3; |
@@ -1303,7 +1244,6 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void StoreIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// The array register points to the backing store for external arrays. |
const Register array = locs()->in(0).reg(); |
@@ -1410,7 +1350,6 @@ void StoreIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* GuardFieldClassInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -1439,11 +1378,9 @@ LocationSummary* GuardFieldClassInstr::MakeLocationSummary(Zone* zone, |
summary->set_temp(i, Location::RequiresRegister()); |
} |
- |
return summary; |
} |
- |
void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(sizeof(classid_t) == kInt16Size); |
const intptr_t value_cid = value()->Type()->ToCid(); |
@@ -1575,7 +1512,6 @@ void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&ok); |
} |
- |
LocationSummary* GuardFieldLengthInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -1598,7 +1534,6 @@ LocationSummary* GuardFieldLengthInstr::MakeLocationSummary(Zone* zone, |
UNREACHABLE(); |
} |
- |
void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
if (field().guarded_list_length() == Field::kNoFixedLength) { |
if (Compiler::IsBackgroundCompilation()) { |
@@ -1669,7 +1604,6 @@ void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
class BoxAllocationSlowPath : public SlowPathCode { |
public: |
BoxAllocationSlowPath(Instruction* instruction, |
@@ -1725,7 +1659,6 @@ class BoxAllocationSlowPath : public SlowPathCode { |
const Register result_; |
}; |
- |
LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -1758,7 +1691,6 @@ LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
static void EnsureMutableBox(FlowGraphCompiler* compiler, |
StoreInstanceFieldInstr* instruction, |
Register box_reg, |
@@ -1777,7 +1709,6 @@ static void EnsureMutableBox(FlowGraphCompiler* compiler, |
__ Bind(&done); |
} |
- |
void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(sizeof(classid_t) == kInt16Size); |
Label skip_store; |
@@ -1929,7 +1860,6 @@ void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&skip_store); |
} |
- |
LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -1941,7 +1871,6 @@ LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
// When the parser is building an implicit static getter for optimization, |
// it can generate a function body where deoptimization ids do not line up |
// with the unoptimized code. |
@@ -1953,7 +1882,6 @@ void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ movq(result, FieldAddress(field, Field::static_value_offset())); |
} |
- |
LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
LocationSummary* locs = |
@@ -1964,7 +1892,6 @@ LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
Register temp = locs()->temp(0).reg(); |
@@ -1979,7 +1906,6 @@ void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 3; |
@@ -1993,7 +1919,6 @@ LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->in(0).reg() == RAX); // Value. |
ASSERT(locs()->in(1).reg() == RDX); // Instantiator type arguments. |
@@ -2003,7 +1928,6 @@ void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->out(0).reg() == RAX); |
} |
- |
// TODO(srdjan): In case of constant inputs make CreateArray kNoCall and |
// use slow path stub. |
LocationSummary* CreateArrayInstr::MakeLocationSummary(Zone* zone, |
@@ -2018,7 +1942,6 @@ LocationSummary* CreateArrayInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
// Inlines array allocation for known constant values. |
static void InlineArrayAllocation(FlowGraphCompiler* compiler, |
intptr_t num_elements, |
@@ -2070,7 +1993,6 @@ static void InlineArrayAllocation(FlowGraphCompiler* compiler, |
__ jmp(done, Assembler::kNearJump); |
} |
- |
void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// Allocate the array. R10 = length, RBX = element type. |
const Register kLengthReg = R10; |
@@ -2111,16 +2033,15 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->out(0).reg() == kResultReg); |
} |
- |
LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
const intptr_t kNumTemps = |
(IsUnboxedLoad() && opt) ? 1 : ((IsPotentialUnboxedLoad()) ? 2 : 0); |
LocationSummary* locs = new (zone) LocationSummary( |
- zone, kNumInputs, kNumTemps, (opt && !IsPotentialUnboxedLoad()) |
- ? LocationSummary::kNoCall |
- : LocationSummary::kCallOnSlowPath); |
+ zone, kNumInputs, kNumTemps, |
+ (opt && !IsPotentialUnboxedLoad()) ? LocationSummary::kNoCall |
+ : LocationSummary::kCallOnSlowPath); |
locs->set_in(0, Location::RequiresRegister()); |
@@ -2135,7 +2056,6 @@ LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(sizeof(classid_t) == kInt16Size); |
Register instance_reg = locs()->in(0).reg(); |
@@ -2234,7 +2154,6 @@ void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&done); |
} |
- |
LocationSummary* InstantiateTypeInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -2247,7 +2166,6 @@ LocationSummary* InstantiateTypeInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register instantiator_type_args_reg = locs()->in(0).reg(); |
Register function_type_args_reg = locs()->in(1).reg(); |
@@ -2266,7 +2184,6 @@ void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ popq(result_reg); // Pop instantiated type. |
} |
- |
LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -2280,7 +2197,6 @@ LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary( |
return locs; |
} |
- |
void InstantiateTypeArgumentsInstr::EmitNativeCode( |
FlowGraphCompiler* compiler) { |
Register instantiator_type_args_reg = locs()->in(0).reg(); |
@@ -2348,7 +2264,6 @@ void InstantiateTypeArgumentsInstr::EmitNativeCode( |
__ Bind(&type_arguments_instantiated); |
} |
- |
LocationSummary* AllocateUninitializedContextInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -2363,7 +2278,6 @@ LocationSummary* AllocateUninitializedContextInstr::MakeLocationSummary( |
return locs; |
} |
- |
class AllocateContextSlowPath : public SlowPathCode { |
public: |
explicit AllocateContextSlowPath( |
@@ -2395,7 +2309,6 @@ class AllocateContextSlowPath : public SlowPathCode { |
AllocateUninitializedContextInstr* instruction_; |
}; |
- |
void AllocateUninitializedContextInstr::EmitNativeCode( |
FlowGraphCompiler* compiler) { |
ASSERT(compiler->is_optimizing()); |
@@ -2419,7 +2332,6 @@ void AllocateUninitializedContextInstr::EmitNativeCode( |
__ Bind(slow_path->exit_label()); |
} |
- |
LocationSummary* AllocateContextInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 0; |
@@ -2431,7 +2343,6 @@ LocationSummary* AllocateContextInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->temp(0).reg() == R10); |
ASSERT(locs()->out(0).reg() == RAX); |
@@ -2441,7 +2352,6 @@ void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
RawPcDescriptors::kOther, locs()); |
} |
- |
LocationSummary* InitStaticFieldInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -2453,7 +2363,6 @@ LocationSummary* InitStaticFieldInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void InitStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register field = locs()->in(0).reg(); |
Register temp = locs()->temp(0).reg(); |
@@ -2476,7 +2385,6 @@ void InitStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&no_call); |
} |
- |
LocationSummary* CloneContextInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -2488,7 +2396,6 @@ LocationSummary* CloneContextInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register context_value = locs()->in(0).reg(); |
Register result = locs()->out(0).reg(); |
@@ -2501,14 +2408,12 @@ void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ popq(result); // Get result (cloned context). |
} |
- |
LocationSummary* CatchBlockEntryInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
UNREACHABLE(); |
return NULL; |
} |
- |
void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(compiler->GetJumpLabel(this)); |
compiler->AddExceptionHandler(catch_try_index(), try_index(), |
@@ -2581,7 +2486,6 @@ void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 0; |
@@ -2592,7 +2496,6 @@ LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
class CheckStackOverflowSlowPath : public SlowPathCode { |
public: |
explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
@@ -2629,7 +2532,6 @@ class CheckStackOverflowSlowPath : public SlowPathCode { |
__ jmp(exit_label()); |
} |
- |
Label* osr_entry_label() { |
ASSERT(Isolate::Current()->use_osr()); |
return &osr_entry_label_; |
@@ -2640,7 +2542,6 @@ class CheckStackOverflowSlowPath : public SlowPathCode { |
Label osr_entry_label_; |
}; |
- |
void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this); |
compiler->AddSlowPathCode(slow_path); |
@@ -2666,7 +2567,6 @@ void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(slow_path->exit_label()); |
} |
- |
static void EmitSmiShiftLeft(FlowGraphCompiler* compiler, |
BinarySmiOpInstr* shift_left) { |
const LocationSummary& locs = *shift_left->locs(); |
@@ -2780,7 +2680,6 @@ static void EmitSmiShiftLeft(FlowGraphCompiler* compiler, |
} |
} |
- |
class CheckedSmiSlowPath : public SlowPathCode { |
public: |
CheckedSmiSlowPath(CheckedSmiOpInstr* instruction, intptr_t try_index) |
@@ -2822,7 +2721,6 @@ class CheckedSmiSlowPath : public SlowPathCode { |
intptr_t try_index_; |
}; |
- |
LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
bool is_shift = (op_kind() == Token::kSHL) || (op_kind() == Token::kSHR); |
@@ -2854,7 +2752,6 @@ LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
CheckedSmiSlowPath* slow_path = |
new CheckedSmiSlowPath(this, compiler->CurrentTryIndex()); |
@@ -2943,7 +2840,6 @@ void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(slow_path->exit_label()); |
} |
- |
class CheckedSmiComparisonSlowPath : public SlowPathCode { |
public: |
CheckedSmiComparisonSlowPath(CheckedSmiComparisonInstr* instruction, |
@@ -3001,7 +2897,6 @@ class CheckedSmiComparisonSlowPath : public SlowPathCode { |
bool merged_; |
}; |
- |
LocationSummary* CheckedSmiComparisonInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -3016,14 +2911,12 @@ LocationSummary* CheckedSmiComparisonInstr::MakeLocationSummary( |
return summary; |
} |
- |
Condition CheckedSmiComparisonInstr::EmitComparisonCode( |
FlowGraphCompiler* compiler, |
BranchLabels labels) { |
return EmitInt64ComparisonOp(compiler, *locs(), kind()); |
} |
- |
#define EMIT_SMI_CHECK \ |
intptr_t left_cid = left()->Type()->ToCid(); \ |
intptr_t right_cid = right()->Type()->ToCid(); \ |
@@ -3042,7 +2935,6 @@ Condition CheckedSmiComparisonInstr::EmitComparisonCode( |
} \ |
__ j(NOT_ZERO, slow_path->entry_label()) |
- |
void CheckedSmiComparisonInstr::EmitBranchCode(FlowGraphCompiler* compiler, |
BranchInstr* branch) { |
BranchLabels labels = compiler->CreateBranchLabels(branch); |
@@ -3057,7 +2949,6 @@ void CheckedSmiComparisonInstr::EmitBranchCode(FlowGraphCompiler* compiler, |
__ Bind(slow_path->exit_label()); |
} |
- |
void CheckedSmiComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Label true_label, false_label, done; |
BranchLabels labels = {&true_label, &false_label, &false_label}; |
@@ -3079,7 +2970,6 @@ void CheckedSmiComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(slow_path->exit_label()); |
} |
- |
static bool CanBeImmediate(const Object& constant) { |
return constant.IsSmi() && |
Immediate(reinterpret_cast<int64_t>(constant.raw())).is_int32(); |
@@ -3089,7 +2979,6 @@ static bool IsSmiValue(const Object& constant, intptr_t value) { |
return constant.IsSmi() && (Smi::Cast(constant).Value() == value); |
} |
- |
LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -3264,7 +3153,6 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
return; |
} // locs()->in(1).IsConstant(). |
- |
if (locs()->in(1).IsStackSlot()) { |
const Address& right = locs()->in(1).ToStackSlotAddress(); |
switch (op_kind()) { |
@@ -3499,7 +3387,6 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
intptr_t left_cid = left()->Type()->ToCid(); |
@@ -3517,7 +3404,6 @@ LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Label* deopt = |
compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryDoubleOp, |
@@ -3541,7 +3427,6 @@ void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ j(ZERO, deopt); |
} |
- |
LocationSummary* BoxInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
const intptr_t kNumInputs = 1; |
const intptr_t kNumTemps = 1; |
@@ -3553,7 +3438,6 @@ LocationSummary* BoxInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return summary; |
} |
- |
void BoxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register out_reg = locs()->out(0).reg(); |
Register temp = locs()->temp(0).reg(); |
@@ -3578,7 +3462,6 @@ void BoxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
const intptr_t kNumInputs = 1; |
const intptr_t kNumTemps = 0; |
@@ -3597,7 +3480,6 @@ LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return summary; |
} |
- |
void UnboxInstr::EmitLoadFromBox(FlowGraphCompiler* compiler) { |
const Register box = locs()->in(0).reg(); |
@@ -3628,7 +3510,6 @@ void UnboxInstr::EmitLoadFromBox(FlowGraphCompiler* compiler) { |
} |
} |
- |
void UnboxInstr::EmitSmiConversion(FlowGraphCompiler* compiler) { |
const Register box = locs()->in(0).reg(); |
@@ -3653,7 +3534,6 @@ void UnboxInstr::EmitSmiConversion(FlowGraphCompiler* compiler) { |
} |
} |
- |
void UnboxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const intptr_t value_cid = value()->Type()->ToCid(); |
const intptr_t box_cid = BoxCid(); |
@@ -3691,7 +3571,6 @@ void UnboxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* UnboxInteger32Instr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -3706,14 +3585,12 @@ LocationSummary* UnboxInteger32Instr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void UnboxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const intptr_t value_cid = value()->Type()->ToCid(); |
const Register value = locs()->in(0).reg(); |
- Label* deopt = |
- CanDeoptimize() |
- ? compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnboxInteger) |
- : NULL; |
+ Label* deopt = CanDeoptimize() ? compiler->AddDeoptStub( |
+ GetDeoptId(), ICData::kDeoptUnboxInteger) |
+ : NULL; |
ASSERT(value == locs()->out(0).reg()); |
if (value_cid == kSmiCid) { |
@@ -3752,7 +3629,6 @@ void UnboxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* BoxInteger32Instr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
ASSERT((from_representation() == kUnboxedInt32) || |
@@ -3766,7 +3642,6 @@ LocationSummary* BoxInteger32Instr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void BoxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Register value = locs()->in(0).reg(); |
const Register out = locs()->out(0).reg(); |
@@ -3782,7 +3657,6 @@ void BoxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ SmiTag(out); |
} |
- |
LocationSummary* BoxInt64Instr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -3799,7 +3673,6 @@ LocationSummary* BoxInt64Instr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void BoxInt64Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Register out = locs()->out(0).reg(); |
const Register value = locs()->in(0).reg(); |
@@ -3816,7 +3689,6 @@ void BoxInt64Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -3829,7 +3701,6 @@ LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -3854,7 +3725,6 @@ void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* DoubleTestOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -3870,7 +3740,6 @@ LocationSummary* DoubleTestOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
Condition DoubleTestOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
BranchLabels labels) { |
ASSERT(compiler->is_optimizing()); |
@@ -3895,7 +3764,6 @@ Condition DoubleTestOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
} |
} |
- |
LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -3908,7 +3776,6 @@ LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -3933,7 +3800,6 @@ void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -3946,7 +3812,6 @@ LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -3971,7 +3836,6 @@ void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Simd32x4ShuffleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -3983,7 +3847,6 @@ LocationSummary* Simd32x4ShuffleInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Simd32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->in(0).fpu_reg(); |
@@ -4015,7 +3878,6 @@ void Simd32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Simd32x4ShuffleMixInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4028,7 +3890,6 @@ LocationSummary* Simd32x4ShuffleMixInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Simd32x4ShuffleMixInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -4044,7 +3905,6 @@ void Simd32x4ShuffleMixInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Simd32x4GetSignMaskInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4056,7 +3916,6 @@ LocationSummary* Simd32x4GetSignMaskInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->in(0).fpu_reg(); |
Register out = locs()->out(0).reg(); |
@@ -4065,7 +3924,6 @@ void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ SmiTag(out); |
} |
- |
LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -4081,7 +3939,6 @@ LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary( |
return summary; |
} |
- |
void Float32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister v0 = locs()->in(0).fpu_reg(); |
XmmRegister v1 = locs()->in(1).fpu_reg(); |
@@ -4104,7 +3961,6 @@ void Float32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ AddImmediate(RSP, Immediate(16)); |
} |
- |
LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 0; |
@@ -4115,13 +3971,11 @@ LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->out(0).fpu_reg(); |
__ xorps(value, value); |
} |
- |
LocationSummary* Float32x4SplatInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4133,7 +3987,6 @@ LocationSummary* Float32x4SplatInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->out(0).fpu_reg(); |
ASSERT(locs()->in(0).fpu_reg() == locs()->out(0).fpu_reg()); |
@@ -4143,7 +3996,6 @@ void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ shufps(value, value, Immediate(0x00)); |
} |
- |
LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4156,7 +4008,6 @@ LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -4188,7 +4039,6 @@ void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4201,7 +4051,6 @@ LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -4220,7 +4069,6 @@ void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4233,7 +4081,6 @@ LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -4251,7 +4098,6 @@ void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float32x4SqrtInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4263,7 +4109,6 @@ LocationSummary* Float32x4SqrtInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
@@ -4284,7 +4129,6 @@ void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float32x4ZeroArgInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4296,7 +4140,6 @@ LocationSummary* Float32x4ZeroArgInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
@@ -4313,7 +4156,6 @@ void Float32x4ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float32x4ClampInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 3; |
@@ -4327,7 +4169,6 @@ LocationSummary* Float32x4ClampInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister lower = locs()->in(1).fpu_reg(); |
@@ -4337,7 +4178,6 @@ void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ maxps(left, lower); |
} |
- |
LocationSummary* Float32x4WithInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4350,7 +4190,6 @@ LocationSummary* Float32x4WithInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister replacement = locs()->in(0).fpu_reg(); |
XmmRegister value = locs()->in(1).fpu_reg(); |
@@ -4407,7 +4246,6 @@ void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4419,12 +4257,10 @@ LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float32x4ToInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// NOP. |
} |
- |
LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4436,7 +4272,6 @@ LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->in(0).fpu_reg(); |
@@ -4453,7 +4288,6 @@ void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 0; |
@@ -4464,13 +4298,11 @@ LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float64x2ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->out(0).fpu_reg(); |
__ xorpd(value, value); |
} |
- |
LocationSummary* Float64x2SplatInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4482,13 +4314,11 @@ LocationSummary* Float64x2SplatInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float64x2SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->out(0).fpu_reg(); |
__ shufpd(value, value, Immediate(0x0)); |
} |
- |
LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -4502,7 +4332,6 @@ LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary( |
return summary; |
} |
- |
void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister v0 = locs()->in(0).fpu_reg(); |
XmmRegister v1 = locs()->in(1).fpu_reg(); |
@@ -4513,7 +4342,6 @@ void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ shufpd(v0, v1, Immediate(0x0)); |
} |
- |
LocationSummary* Float64x2ToFloat32x4Instr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -4526,13 +4354,11 @@ LocationSummary* Float64x2ToFloat32x4Instr::MakeLocationSummary( |
return summary; |
} |
- |
void Float64x2ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->out(0).fpu_reg(); |
__ cvtpd2ps(value, value); |
} |
- |
LocationSummary* Float32x4ToFloat64x2Instr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -4545,13 +4371,11 @@ LocationSummary* Float32x4ToFloat64x2Instr::MakeLocationSummary( |
return summary; |
} |
- |
void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->out(0).fpu_reg(); |
__ cvtps2pd(value, value); |
} |
- |
LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4569,7 +4393,6 @@ LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
@@ -4595,7 +4418,6 @@ void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4608,7 +4430,6 @@ LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -4650,7 +4471,6 @@ void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 4; |
@@ -4665,7 +4485,6 @@ LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register v0 = locs()->in(0).reg(); |
Register v1 = locs()->in(1).reg(); |
@@ -4681,7 +4500,6 @@ void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ AddImmediate(RSP, Immediate(4 * kInt32Size)); |
} |
- |
LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -4698,7 +4516,6 @@ LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
return summary; |
} |
- |
void Int32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register v0 = locs()->in(0).reg(); |
Register v1 = locs()->in(1).reg(); |
@@ -4752,7 +4569,6 @@ void Int32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ AddImmediate(RSP, Immediate(16)); |
} |
- |
LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4764,7 +4580,6 @@ LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->in(0).fpu_reg(); |
Register result = locs()->out(0).reg(); |
@@ -4799,7 +4614,6 @@ void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&done); |
} |
- |
LocationSummary* Int32x4SelectInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 3; |
@@ -4814,7 +4628,6 @@ LocationSummary* Int32x4SelectInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Int32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister mask = locs()->in(0).fpu_reg(); |
XmmRegister trueValue = locs()->in(1).fpu_reg(); |
@@ -4834,7 +4647,6 @@ void Int32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ orps(mask, temp); |
} |
- |
LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4848,7 +4660,6 @@ LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister mask = locs()->in(0).fpu_reg(); |
Register flag = locs()->in(1).reg(); |
@@ -4902,7 +4713,6 @@ void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ AddImmediate(RSP, Immediate(16)); |
} |
- |
LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -4914,12 +4724,10 @@ LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void Int32x4ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// NOP. |
} |
- |
LocationSummary* BinaryInt32x4OpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -4932,7 +4740,6 @@ LocationSummary* BinaryInt32x4OpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister left = locs()->in(0).fpu_reg(); |
XmmRegister right = locs()->in(1).fpu_reg(); |
@@ -4961,7 +4768,6 @@ void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
ASSERT((kind() == MathUnaryInstr::kSqrt) || |
@@ -4979,7 +4785,6 @@ LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
if (kind() == MathUnaryInstr::kSqrt) { |
__ sqrtsd(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg()); |
@@ -4992,7 +4797,6 @@ void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
@@ -5007,7 +4811,6 @@ LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary( |
return summary; |
} |
- |
void CaseInsensitiveCompareUC16Instr::EmitNativeCode( |
FlowGraphCompiler* compiler) { |
// Save RSP. R13 is chosen because it is callee saved so we do not need to |
@@ -5023,7 +4826,6 @@ void CaseInsensitiveCompareUC16Instr::EmitNativeCode( |
__ movq(RSP, kSavedSPReg); |
} |
- |
LocationSummary* UnarySmiOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5031,7 +4833,6 @@ LocationSummary* UnarySmiOpInstr::MakeLocationSummary(Zone* zone, |
LocationSummary::kNoCall); |
} |
- |
void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
ASSERT(value == locs()->out(0).reg()); |
@@ -5052,7 +4853,6 @@ void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5064,14 +4864,12 @@ LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->in(0).fpu_reg(); |
ASSERT(locs()->out(0).fpu_reg() == value); |
__ DoubleNegate(value); |
} |
- |
LocationSummary* MathMinMaxInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
if (result_cid() == kDoubleCid) { |
@@ -5098,7 +4896,6 @@ LocationSummary* MathMinMaxInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT((op_kind() == MethodRecognizer::kMathMin) || |
(op_kind() == MethodRecognizer::kMathMax)); |
@@ -5161,7 +4958,6 @@ void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* Int32ToDoubleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5173,14 +4969,12 @@ LocationSummary* Int32ToDoubleInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
void Int32ToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
FpuRegister result = locs()->out(0).fpu_reg(); |
__ cvtsi2sdl(result, value); |
} |
- |
LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5192,7 +4986,6 @@ LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
FpuRegister result = locs()->out(0).fpu_reg(); |
@@ -5200,19 +4993,16 @@ void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ cvtsi2sdq(result, value); |
} |
- |
LocationSummary* MintToDoubleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
UNIMPLEMENTED(); |
return NULL; |
} |
- |
void MintToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
UNIMPLEMENTED(); |
} |
- |
LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5225,7 +5015,6 @@ LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register result = locs()->out(0).reg(); |
Register value_obj = locs()->in(0).reg(); |
@@ -5259,7 +5048,6 @@ void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&done); |
} |
- |
LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5272,7 +5060,6 @@ LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi); |
Register result = locs()->out(0).reg(); |
@@ -5289,7 +5076,6 @@ void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ SmiTag(result); |
} |
- |
LocationSummary* DoubleToDoubleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5301,7 +5087,6 @@ LocationSummary* DoubleToDoubleInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
XmmRegister value = locs()->in(0).fpu_reg(); |
XmmRegister result = locs()->out(0).fpu_reg(); |
@@ -5320,7 +5105,6 @@ void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* DoubleToFloatInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5332,12 +5116,10 @@ LocationSummary* DoubleToFloatInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
void DoubleToFloatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ cvtsd2ss(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg()); |
} |
- |
LocationSummary* FloatToDoubleInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5349,12 +5131,10 @@ LocationSummary* FloatToDoubleInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
void FloatToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ cvtss2sd(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg()); |
} |
- |
LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
// Calling convention on x64 uses XMM0 and XMM1 to pass the first two |
@@ -5384,7 +5164,6 @@ LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(Zone* zone, |
return result; |
} |
- |
// Pseudo code: |
// if (exponent == 0.0) return 1.0; |
// // Speed up simple cases. |
@@ -5517,7 +5296,6 @@ static void InvokeDoublePow(FlowGraphCompiler* compiler, |
__ Bind(&skip_call); |
} |
- |
void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
if (recognized_kind() == MethodRecognizer::kMathDoublePow) { |
InvokeDoublePow(compiler, this); |
@@ -5537,7 +5315,6 @@ void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ movq(RSP, locs()->temp(kSavedSpTempIndex).reg()); |
} |
- |
LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
// Only use this instruction in optimized code. |
@@ -5570,7 +5347,6 @@ LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void ExtractNthOutputInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->in(0).IsPairLocation()); |
PairLocation* pair = locs()->in(0).AsPairLocation(); |
@@ -5587,7 +5363,6 @@ void ExtractNthOutputInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* TruncDivModInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -5602,7 +5377,6 @@ LocationSummary* TruncDivModInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void TruncDivModInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(CanDeoptimize()); |
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinarySmiOp); |
@@ -5692,14 +5466,12 @@ void TruncDivModInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// in-range arguments, cannot create out-of-range result. |
} |
- |
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( |
Zone* zone, |
bool opt) const { |
return MakeCallSummary(zone); |
} |
- |
LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
comparison()->InitializeLocationSummary(zone, opt); |
// Branches don't produce a result. |
@@ -5707,12 +5479,10 @@ LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return comparison()->locs(); |
} |
- |
void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
comparison()->EmitBranchCode(compiler, this); |
} |
- |
LocationSummary* CheckClassInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5730,14 +5500,12 @@ LocationSummary* CheckClassInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void CheckClassInstr::EmitNullCheck(FlowGraphCompiler* compiler, Label* deopt) { |
__ CompareObject(locs()->in(0).reg(), Object::null_object()); |
Condition cond = IsDeoptIfNull() ? EQUAL : NOT_EQUAL; |
__ j(cond, deopt); |
} |
- |
void CheckClassInstr::EmitBitTest(FlowGraphCompiler* compiler, |
intptr_t min, |
intptr_t max, |
@@ -5754,7 +5522,6 @@ void CheckClassInstr::EmitBitTest(FlowGraphCompiler* compiler, |
__ j(NOT_CARRY, deopt); |
} |
- |
int CheckClassInstr::EmitCheckCid(FlowGraphCompiler* compiler, |
int bias, |
intptr_t cid_start, |
@@ -5791,7 +5558,6 @@ int CheckClassInstr::EmitCheckCid(FlowGraphCompiler* compiler, |
return bias; |
} |
- |
LocationSummary* CheckSmiInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5802,7 +5568,6 @@ LocationSummary* CheckSmiInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi, |
@@ -5810,7 +5575,6 @@ void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ BranchIfNotSmi(value, deopt); |
} |
- |
LocationSummary* CheckClassIdInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -5822,7 +5586,6 @@ LocationSummary* CheckClassIdInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckClass); |
@@ -5836,7 +5599,6 @@ void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* GenericCheckBoundInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -5848,7 +5610,6 @@ LocationSummary* GenericCheckBoundInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
class RangeErrorSlowPath : public SlowPathCode { |
public: |
RangeErrorSlowPath(GenericCheckBoundInstr* instruction, intptr_t try_index) |
@@ -5878,7 +5639,6 @@ class RangeErrorSlowPath : public SlowPathCode { |
intptr_t try_index_; |
}; |
- |
void GenericCheckBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
RangeErrorSlowPath* slow_path = |
new RangeErrorSlowPath(this, compiler->CurrentTryIndex()); |
@@ -5895,7 +5655,6 @@ void GenericCheckBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ j(ABOVE_EQUAL, slow_path->entry_label()); |
} |
- |
LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -5907,7 +5666,6 @@ LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
uint32_t flags = generalized_ ? ICData::kGeneralized : 0; |
flags |= licm_hoisted_ ? ICData::kHoisted : 0; |
@@ -5959,7 +5717,6 @@ void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
template <typename OperandType> |
static void EmitInt64Arithmetic(FlowGraphCompiler* compiler, |
Token::Kind op_kind, |
@@ -5991,7 +5748,6 @@ static void EmitInt64Arithmetic(FlowGraphCompiler* compiler, |
if (deopt != NULL) __ j(OVERFLOW, deopt); |
} |
- |
LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -6004,7 +5760,6 @@ LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Register left = locs()->in(0).reg(); |
const Register right = locs()->in(1).reg(); |
@@ -6020,7 +5775,6 @@ void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
EmitInt64Arithmetic(compiler, op_kind(), left, right, deopt); |
} |
- |
LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -6032,7 +5786,6 @@ LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(op_kind() == Token::kBIT_NOT); |
const Register left = locs()->in(0).reg(); |
@@ -6041,7 +5794,6 @@ void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ notq(left); |
} |
- |
LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -6057,7 +5809,6 @@ LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Register left = locs()->in(0).reg(); |
const Register out = locs()->out(0).reg(); |
@@ -6131,22 +5882,18 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
CompileType BinaryUint32OpInstr::ComputeType() const { |
return CompileType::FromCid(kSmiCid); |
} |
- |
CompileType ShiftUint32OpInstr::ComputeType() const { |
return CompileType::FromCid(kSmiCid); |
} |
- |
CompileType UnaryUint32OpInstr::ComputeType() const { |
return CompileType::FromCid(kSmiCid); |
} |
- |
LocationSummary* BinaryUint32OpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -6159,7 +5906,6 @@ LocationSummary* BinaryUint32OpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
template <typename OperandType> |
static void EmitIntegerArithmetic(FlowGraphCompiler* compiler, |
Token::Kind op_kind, |
@@ -6191,7 +5937,6 @@ static void EmitIntegerArithmetic(FlowGraphCompiler* compiler, |
if (deopt != NULL) __ j(OVERFLOW, deopt); |
} |
- |
void BinaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register left = locs()->in(0).reg(); |
Register right = locs()->in(1).reg(); |
@@ -6211,7 +5956,6 @@ void BinaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* ShiftUint32OpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 2; |
@@ -6224,7 +5968,6 @@ LocationSummary* ShiftUint32OpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const intptr_t kShifterLimit = 31; |
@@ -6232,7 +5975,6 @@ void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register out = locs()->out(0).reg(); |
ASSERT(left == out); |
- |
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp); |
if (locs()->in(1).IsConstant()) { |
@@ -6295,7 +6037,6 @@ void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&done); |
} |
- |
LocationSummary* UnaryUint32OpInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -6307,7 +6048,6 @@ LocationSummary* UnaryUint32OpInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register out = locs()->out(0).reg(); |
ASSERT(locs()->in(0).reg() == out); |
@@ -6317,10 +6057,8 @@ void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ notl(out); |
} |
- |
DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryInt32OpInstr) |
- |
LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -6344,7 +6082,6 @@ LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
if (from() == kUnboxedInt32 && to() == kUnboxedUint32) { |
const Register value = locs()->in(0).reg(); |
@@ -6399,24 +6136,20 @@ void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall); |
} |
- |
void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
compiler->GenerateRuntimeCall(token_pos(), deopt_id(), kThrowRuntimeEntry, 1, |
locs()); |
__ int3(); |
} |
- |
LocationSummary* ReThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall); |
} |
- |
void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
compiler->SetNeedsStackTrace(catch_try_index()); |
compiler->GenerateRuntimeCall(token_pos(), deopt_id(), kReThrowRuntimeEntry, |
@@ -6424,29 +6157,24 @@ void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ int3(); |
} |
- |
LocationSummary* StopInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall); |
} |
- |
void StopInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Stop(message()); |
} |
- |
void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
if (!compiler->CanFallThroughTo(normal_entry())) { |
__ jmp(compiler->GetJumpLabel(normal_entry())); |
} |
} |
- |
LocationSummary* GotoInstr::MakeLocationSummary(Zone* zone, bool opt) const { |
return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall); |
} |
- |
void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
if (!compiler->is_optimizing()) { |
if (FLAG_reorder_basic_blocks) { |
@@ -6468,7 +6196,6 @@ void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} |
} |
- |
LocationSummary* IndirectGotoInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -6483,7 +6210,6 @@ LocationSummary* IndirectGotoInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register offset_reg = locs()->in(0).reg(); |
Register target_address_reg = locs()->temp(0).reg(); |
@@ -6532,7 +6258,6 @@ LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone, |
return locs; |
} |
- |
Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
BranchLabels labels) { |
Location left = locs()->in(0); |
@@ -6558,7 +6283,6 @@ Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
return true_condition; |
} |
- |
LocationSummary* ClosureCallInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
const intptr_t kNumInputs = 1; |
@@ -6570,7 +6294,6 @@ LocationSummary* ClosureCallInstr::MakeLocationSummary(Zone* zone, |
return summary; |
} |
- |
void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// Arguments descriptor is expected in R10. |
const intptr_t argument_count = ArgumentCount(); // Includes type args. |
@@ -6604,14 +6327,12 @@ void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Drop(argument_count); |
} |
- |
LocationSummary* BooleanNegateInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
return LocationSummary::Make(zone, 1, Location::RequiresRegister(), |
LocationSummary::kNoCall); |
} |
- |
void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
Register result = locs()->out(0).reg(); |
@@ -6624,13 +6345,11 @@ void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(&done); |
} |
- |
LocationSummary* AllocateObjectInstr::MakeLocationSummary(Zone* zone, |
bool opt) const { |
return MakeCallSummary(zone); |
} |
- |
void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Code& stub = Code::ZoneHandle( |
compiler->zone(), StubCode::GetAllocationStubForClass(cls())); |
@@ -6641,7 +6360,6 @@ void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Drop(ArgumentCount()); // Discard arguments. |
} |
- |
void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(!compiler->is_optimizing()); |
__ CallPatchable(*StubCode::DebugStepCheck_entry()); |
@@ -6649,7 +6367,6 @@ void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
compiler->RecordSafepoint(locs()); |
} |
- |
} // namespace dart |
#undef __ |