| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 361       InstructionOperand addr_reg = g.TempRegister(); | 361       InstructionOperand addr_reg = g.TempRegister(); | 
| 362       Emit(kMipsAdd | AddressingModeField::encode(kMode_None), addr_reg, | 362       Emit(kMipsAdd | AddressingModeField::encode(kMode_None), addr_reg, | 
| 363            g.UseRegister(index), g.UseRegister(base)); | 363            g.UseRegister(index), g.UseRegister(base)); | 
| 364       // Emit desired store opcode, using temp addr_reg. | 364       // Emit desired store opcode, using temp addr_reg. | 
| 365       Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), | 365       Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), | 
| 366            addr_reg, g.TempImmediate(0), g.UseRegisterOrImmediateZero(value)); | 366            addr_reg, g.TempImmediate(0), g.UseRegisterOrImmediateZero(value)); | 
| 367     } | 367     } | 
| 368   } | 368   } | 
| 369 } | 369 } | 
| 370 | 370 | 
|  | 371 void InstructionSelector::VisitProtectedStore(Node* node) { | 
|  | 372   // TODO(eholk) | 
|  | 373   UNIMPLEMENTED(); | 
|  | 374 } | 
| 371 | 375 | 
| 372 void InstructionSelector::VisitWord32And(Node* node) { | 376 void InstructionSelector::VisitWord32And(Node* node) { | 
| 373   MipsOperandGenerator g(this); | 377   MipsOperandGenerator g(this); | 
| 374   Int32BinopMatcher m(node); | 378   Int32BinopMatcher m(node); | 
| 375   if (m.left().IsWord32Shr() && CanCover(node, m.left().node()) && | 379   if (m.left().IsWord32Shr() && CanCover(node, m.left().node()) && | 
| 376       m.right().HasValue()) { | 380       m.right().HasValue()) { | 
| 377     uint32_t mask = m.right().Value(); | 381     uint32_t mask = m.right().Value(); | 
| 378     uint32_t mask_width = base::bits::CountPopulation32(mask); | 382     uint32_t mask_width = base::bits::CountPopulation32(mask); | 
| 379     uint32_t mask_msb = base::bits::CountLeadingZeros32(mask); | 383     uint32_t mask_msb = base::bits::CountLeadingZeros32(mask); | 
| 380     if ((mask_width != 0) && (mask_msb + mask_width == 32)) { | 384     if ((mask_width != 0) && (mask_msb + mask_width == 32)) { | 
| (...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1917     DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || | 1921     DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || | 
| 1918            IsMipsArchVariant(kMips32r2)); | 1922            IsMipsArchVariant(kMips32r2)); | 
| 1919     return MachineOperatorBuilder::AlignmentRequirements:: | 1923     return MachineOperatorBuilder::AlignmentRequirements:: | 
| 1920         NoUnalignedAccessSupport(); | 1924         NoUnalignedAccessSupport(); | 
| 1921   } | 1925   } | 
| 1922 } | 1926 } | 
| 1923 | 1927 | 
| 1924 }  // namespace compiler | 1928 }  // namespace compiler | 
| 1925 }  // namespace internal | 1929 }  // namespace internal | 
| 1926 }  // namespace v8 | 1930 }  // namespace v8 | 
| OLD | NEW | 
|---|