[turbofan] Remove unused instruction continuation handling for stack checks.
Bug: v8:5267 Change-Id: I649554733fdbd00c8e82b09aca35b0ff1f823560 Reviewed-on: https://chromium-review.googlesource.com/890262 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#50919}
This commit is contained in:
parent
adb0012ff2
commit
ff394b4453
@ -1276,17 +1276,9 @@ void VisitWordCompare(InstructionSelector* selector, Node* node,
|
||||
// Compare(Load(js_stack_limit), LoadStackPointer)
|
||||
if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute();
|
||||
InstructionCode opcode = cont->Encode(kIA32StackCheck);
|
||||
if (cont->IsBranch()) {
|
||||
selector->Emit(opcode, g.NoOutput(), g.Label(cont->true_block()),
|
||||
g.Label(cont->false_block()));
|
||||
} else if (cont->IsDeoptimize()) {
|
||||
selector->EmitDeoptimize(opcode, 0, nullptr, 0, nullptr, cont->kind(),
|
||||
cont->reason(), cont->feedback(),
|
||||
cont->frame_state());
|
||||
} else {
|
||||
DCHECK(cont->IsSet());
|
||||
selector->Emit(opcode, g.DefineAsRegister(cont->result()));
|
||||
}
|
||||
CHECK(cont->IsBranch());
|
||||
selector->Emit(opcode, g.NoOutput(), g.Label(cont->true_block()),
|
||||
g.Label(cont->false_block()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1734,19 +1734,9 @@ void VisitWord64Compare(InstructionSelector* selector, Node* node,
|
||||
// Compare(Load(js_stack_limit), LoadStackPointer)
|
||||
if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute();
|
||||
InstructionCode opcode = cont->Encode(kX64StackCheck);
|
||||
if (cont->IsBranch()) {
|
||||
selector->Emit(opcode, g.NoOutput(), g.Label(cont->true_block()),
|
||||
g.Label(cont->false_block()));
|
||||
} else if (cont->IsDeoptimize()) {
|
||||
selector->EmitDeoptimize(opcode, 0, nullptr, 0, nullptr, cont->kind(),
|
||||
cont->reason(), cont->feedback(),
|
||||
cont->frame_state());
|
||||
} else if (cont->IsSet()) {
|
||||
selector->Emit(opcode, g.DefineAsRegister(cont->result()));
|
||||
} else {
|
||||
DCHECK(cont->IsTrap());
|
||||
selector->Emit(opcode, g.NoOutput(), g.UseImmediate(cont->trap_id()));
|
||||
}
|
||||
CHECK(cont->IsBranch());
|
||||
selector->Emit(opcode, g.NoOutput(), g.Label(cont->true_block()),
|
||||
g.Label(cont->false_block()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -830,26 +830,6 @@ TEST_F(InstructionSelectorTest, Float64BinopArithmetic) {
|
||||
// -----------------------------------------------------------------------------
|
||||
// Miscellaneous.
|
||||
|
||||
|
||||
TEST_F(InstructionSelectorTest, Uint32LessThanWithLoadAndLoadStackPointer) {
|
||||
StreamBuilder m(this, MachineType::Bool());
|
||||
Node* const sl = m.Load(
|
||||
MachineType::Pointer(),
|
||||
m.ExternalConstant(ExternalReference::address_of_stack_limit(isolate())));
|
||||
Node* const sp = m.LoadStackPointer();
|
||||
Node* const n = m.Uint32LessThan(sl, sp);
|
||||
m.Return(n);
|
||||
Stream s = m.Build();
|
||||
ASSERT_EQ(1U, s.size());
|
||||
EXPECT_EQ(kIA32StackCheck, s[0]->arch_opcode());
|
||||
ASSERT_EQ(0U, s[0]->InputCount());
|
||||
ASSERT_EQ(1U, s[0]->OutputCount());
|
||||
EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
|
||||
EXPECT_EQ(kFlags_set, s[0]->flags_mode());
|
||||
EXPECT_EQ(kUnsignedGreaterThan, s[0]->flags_condition());
|
||||
}
|
||||
|
||||
|
||||
TEST_F(InstructionSelectorTest, Word32Clz) {
|
||||
StreamBuilder m(this, MachineType::Uint32(), MachineType::Uint32());
|
||||
Node* const p0 = m.Parameter(0);
|
||||
|
@ -1463,25 +1463,6 @@ TEST_F(InstructionSelectorTest, Float64BinopArithmetic) {
|
||||
// Miscellaneous.
|
||||
|
||||
|
||||
TEST_F(InstructionSelectorTest, Uint64LessThanWithLoadAndLoadStackPointer) {
|
||||
StreamBuilder m(this, MachineType::Bool());
|
||||
Node* const sl = m.Load(
|
||||
MachineType::Pointer(),
|
||||
m.ExternalConstant(ExternalReference::address_of_stack_limit(isolate())));
|
||||
Node* const sp = m.LoadStackPointer();
|
||||
Node* const n = m.Uint64LessThan(sl, sp);
|
||||
m.Return(n);
|
||||
Stream s = m.Build();
|
||||
ASSERT_EQ(1U, s.size());
|
||||
EXPECT_EQ(kX64StackCheck, s[0]->arch_opcode());
|
||||
ASSERT_EQ(0U, s[0]->InputCount());
|
||||
ASSERT_EQ(1U, s[0]->OutputCount());
|
||||
EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
|
||||
EXPECT_EQ(kFlags_set, s[0]->flags_mode());
|
||||
EXPECT_EQ(kUnsignedGreaterThan, s[0]->flags_condition());
|
||||
}
|
||||
|
||||
|
||||
TEST_F(InstructionSelectorTest, Word64ShlWithChangeInt32ToInt64) {
|
||||
TRACED_FORRANGE(int64_t, x, 32, 63) {
|
||||
StreamBuilder m(this, MachineType::Int64(), MachineType::Int32());
|
||||
|
Loading…
Reference in New Issue
Block a user