| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
| 7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 InstructionOperand addr_reg = g.TempRegister(); | 431 InstructionOperand addr_reg = g.TempRegister(); |
| 432 Emit(kMips64Dadd | AddressingModeField::encode(kMode_None), addr_reg, | 432 Emit(kMips64Dadd | AddressingModeField::encode(kMode_None), addr_reg, |
| 433 g.UseRegister(index), g.UseRegister(base)); | 433 g.UseRegister(index), g.UseRegister(base)); |
| 434 // Emit desired store opcode, using temp addr_reg. | 434 // Emit desired store opcode, using temp addr_reg. |
| 435 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), | 435 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), |
| 436 addr_reg, g.TempImmediate(0), g.UseRegisterOrImmediateZero(value)); | 436 addr_reg, g.TempImmediate(0), g.UseRegisterOrImmediateZero(value)); |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 | 440 |
| 441 void InstructionSelector::VisitProtectedStore(Node* node) { |
| 442 // TODO(eholk) |
| 443 UNIMPLEMENTED(); |
| 444 } |
| 441 | 445 |
| 442 void InstructionSelector::VisitWord32And(Node* node) { | 446 void InstructionSelector::VisitWord32And(Node* node) { |
| 443 Mips64OperandGenerator g(this); | 447 Mips64OperandGenerator g(this); |
| 444 Int32BinopMatcher m(node); | 448 Int32BinopMatcher m(node); |
| 445 if (m.left().IsWord32Shr() && CanCover(node, m.left().node()) && | 449 if (m.left().IsWord32Shr() && CanCover(node, m.left().node()) && |
| 446 m.right().HasValue()) { | 450 m.right().HasValue()) { |
| 447 uint32_t mask = m.right().Value(); | 451 uint32_t mask = m.right().Value(); |
| 448 uint32_t mask_width = base::bits::CountPopulation32(mask); | 452 uint32_t mask_width = base::bits::CountPopulation32(mask); |
| 449 uint32_t mask_msb = base::bits::CountLeadingZeros32(mask); | 453 uint32_t mask_msb = base::bits::CountLeadingZeros32(mask); |
| 450 if ((mask_width != 0) && (mask_msb + mask_width == 32)) { | 454 if ((mask_width != 0) && (mask_msb + mask_width == 32)) { |
| (...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2599 } else { | 2603 } else { |
| 2600 DCHECK(kArchVariant == kMips64r2); | 2604 DCHECK(kArchVariant == kMips64r2); |
| 2601 return MachineOperatorBuilder::AlignmentRequirements:: | 2605 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2602 NoUnalignedAccessSupport(); | 2606 NoUnalignedAccessSupport(); |
| 2603 } | 2607 } |
| 2604 } | 2608 } |
| 2605 | 2609 |
| 2606 } // namespace compiler | 2610 } // namespace compiler |
| 2607 } // namespace internal | 2611 } // namespace internal |
| 2608 } // namespace v8 | 2612 } // namespace v8 |
| OLD | NEW |