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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 InstructionOperand addr_reg = g.TempRegister(); | 457 InstructionOperand addr_reg = g.TempRegister(); |
458 Emit(kMips64Dadd | AddressingModeField::encode(kMode_None), addr_reg, | 458 Emit(kMips64Dadd | AddressingModeField::encode(kMode_None), addr_reg, |
459 g.UseRegister(index), g.UseRegister(base)); | 459 g.UseRegister(index), g.UseRegister(base)); |
460 // Emit desired store opcode, using temp addr_reg. | 460 // Emit desired store opcode, using temp addr_reg. |
461 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), | 461 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), |
462 addr_reg, g.TempImmediate(0), g.UseRegisterOrImmediateZero(value)); | 462 addr_reg, g.TempImmediate(0), g.UseRegisterOrImmediateZero(value)); |
463 } | 463 } |
464 } | 464 } |
465 } | 465 } |
466 | 466 |
| 467 void InstructionSelector::VisitProtectedStore(Node* node) { |
| 468 // TODO(eholk) |
| 469 UNIMPLEMENTED(); |
| 470 } |
467 | 471 |
468 void InstructionSelector::VisitWord32And(Node* node) { | 472 void InstructionSelector::VisitWord32And(Node* node) { |
469 Mips64OperandGenerator g(this); | 473 Mips64OperandGenerator g(this); |
470 Int32BinopMatcher m(node); | 474 Int32BinopMatcher m(node); |
471 if (m.left().IsWord32Shr() && CanCover(node, m.left().node()) && | 475 if (m.left().IsWord32Shr() && CanCover(node, m.left().node()) && |
472 m.right().HasValue()) { | 476 m.right().HasValue()) { |
473 uint32_t mask = m.right().Value(); | 477 uint32_t mask = m.right().Value(); |
474 uint32_t mask_width = base::bits::CountPopulation32(mask); | 478 uint32_t mask_width = base::bits::CountPopulation32(mask); |
475 uint32_t mask_msb = base::bits::CountLeadingZeros32(mask); | 479 uint32_t mask_msb = base::bits::CountLeadingZeros32(mask); |
476 if ((mask_width != 0) && (mask_msb + mask_width == 32)) { | 480 if ((mask_width != 0) && (mask_msb + mask_width == 32)) { |
(...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2625 } else { | 2629 } else { |
2626 DCHECK(kArchVariant == kMips64r2); | 2630 DCHECK(kArchVariant == kMips64r2); |
2627 return MachineOperatorBuilder::AlignmentRequirements:: | 2631 return MachineOperatorBuilder::AlignmentRequirements:: |
2628 NoUnalignedAccessSupport(); | 2632 NoUnalignedAccessSupport(); |
2629 } | 2633 } |
2630 } | 2634 } |
2631 | 2635 |
2632 } // namespace compiler | 2636 } // namespace compiler |
2633 } // namespace internal | 2637 } // namespace internal |
2634 } // namespace v8 | 2638 } // namespace v8 |
OLD | NEW |