diff options
Diffstat (limited to 'deps/v8/src/compiler/arm64/instruction-selector-arm64.cc')
-rw-r--r-- | deps/v8/src/compiler/arm64/instruction-selector-arm64.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/deps/v8/src/compiler/arm64/instruction-selector-arm64.cc b/deps/v8/src/compiler/arm64/instruction-selector-arm64.cc index a471a2b8b3..0e9fd0ca2b 100644 --- a/deps/v8/src/compiler/arm64/instruction-selector-arm64.cc +++ b/deps/v8/src/compiler/arm64/instruction-selector-arm64.cc @@ -527,6 +527,15 @@ int32_t LeftShiftForReducedMultiply(Matcher* m) { } // namespace +void InstructionSelector::VisitStackSlot(Node* node) { + StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); + int slot = frame_->AllocateSpillSlot(rep.size()); + OperandGenerator g(this); + + Emit(kArchStackSlot, g.DefineAsRegister(node), + sequence()->AddImmediate(Constant(slot)), 0, nullptr); +} + void EmitLoad(InstructionSelector* selector, Node* node, InstructionCode opcode, ImmediateMode immediate_mode, MachineRepresentation rep, Node* output = nullptr) { @@ -919,7 +928,8 @@ void InstructionSelector::VisitWord32And(Node* node) { uint32_t mask = m.right().Value(); uint32_t mask_width = base::bits::CountPopulation32(mask); uint32_t mask_msb = base::bits::CountLeadingZeros32(mask); - if ((mask_width != 0) && (mask_msb + mask_width == 32)) { + if ((mask_width != 0) && (mask_width != 32) && + (mask_msb + mask_width == 32)) { // The mask must be contiguous, and occupy the least-significant bits. DCHECK_EQ(0u, base::bits::CountTrailingZeros32(mask)); @@ -1775,7 +1785,8 @@ void InstructionSelector::EmitPrepareArguments( // TODO(titzer): it would be better to bump the csp here only // and emit paired stores with increment for non c frames. ArchOpcode claim = to_native_stack ? kArm64ClaimCSP : kArm64ClaimJSSP; - // Claim(0) isn't a nop if there is a mismatch between CSP and JSSP. + // ClaimJSSP(0) or ClaimCSP(0) isn't a nop if there is a mismatch between + // CSP and JSSP. Emit(claim, g.NoOutput(), g.TempImmediate(claim_count)); } |