| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Calculate the base address of the entry. | 50 // Calculate the base address of the entry. |
| 51 __ li(base_addr, Operand(key_offset)); | 51 __ li(base_addr, Operand(key_offset)); |
| 52 __ dsll(at, offset_scratch, kPointerSizeLog2); | 52 __ dsll(at, offset_scratch, kPointerSizeLog2); |
| 53 __ Daddu(base_addr, base_addr, at); | 53 __ Daddu(base_addr, base_addr, at); |
| 54 | 54 |
| 55 // Check that the key in the entry matches the name. | 55 // Check that the key in the entry matches the name. |
| 56 __ ld(at, MemOperand(base_addr, 0)); | 56 __ ld(at, MemOperand(base_addr, 0)); |
| 57 __ Branch(&miss, ne, name, Operand(at)); | 57 __ Branch(&miss, ne, name, Operand(at)); |
| 58 | 58 |
| 59 // Check the map matches. | 59 // Check the map matches. |
| 60 __ ld(at, MemOperand(base_addr, map_off_addr - key_off_addr)); | 60 __ ld(at, MemOperand(base_addr, |
| 61 static_cast<int32_t>(map_off_addr - key_off_addr))); |
| 61 __ ld(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 62 __ ld(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
| 62 __ Branch(&miss, ne, at, Operand(scratch2)); | 63 __ Branch(&miss, ne, at, Operand(scratch2)); |
| 63 | 64 |
| 64 // Get the code entry from the cache. | 65 // Get the code entry from the cache. |
| 65 Register code = scratch2; | 66 Register code = scratch2; |
| 66 scratch2 = no_reg; | 67 scratch2 = no_reg; |
| 67 __ ld(code, MemOperand(base_addr, value_off_addr - key_off_addr)); | 68 __ ld(code, MemOperand(base_addr, |
| 69 static_cast<int32_t>(value_off_addr - key_off_addr))); |
| 68 | 70 |
| 69 // Check that the flags match what we're looking for. | 71 // Check that the flags match what we're looking for. |
| 70 Register flags_reg = base_addr; | 72 Register flags_reg = base_addr; |
| 71 base_addr = no_reg; | 73 base_addr = no_reg; |
| 72 __ lw(flags_reg, FieldMemOperand(code, Code::kFlagsOffset)); | 74 __ lw(flags_reg, FieldMemOperand(code, Code::kFlagsOffset)); |
| 73 __ And(flags_reg, flags_reg, Operand(~Code::kFlagsNotUsedInLookup)); | 75 __ And(flags_reg, flags_reg, Operand(~Code::kFlagsNotUsedInLookup)); |
| 74 __ Branch(&miss, ne, flags_reg, Operand(flags)); | 76 __ Branch(&miss, ne, flags_reg, Operand(flags)); |
| 75 | 77 |
| 76 #ifdef DEBUG | 78 #ifdef DEBUG |
| 77 if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) { | 79 if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2, | 169 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2, |
| 168 extra3); | 170 extra3); |
| 169 } | 171 } |
| 170 | 172 |
| 171 | 173 |
| 172 #undef __ | 174 #undef __ |
| 173 } // namespace internal | 175 } // namespace internal |
| 174 } // namespace v8 | 176 } // namespace v8 |
| 175 | 177 |
| 176 #endif // V8_TARGET_ARCH_MIPS64 | 178 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |