Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 1546323002: [ic] Fixed receiver_map register trashing in KeyedStoreIC megamorphic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | test/mjsunit/regress/regress-crbug-571370.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 lbz(scratch, FieldMemOperand(map, Map::kBitField2Offset)); 1828 lbz(scratch, FieldMemOperand(map, Map::kBitField2Offset));
1829 cmpli(scratch, Operand(Map::kMaximumBitField2FastHoleySmiElementValue)); 1829 cmpli(scratch, Operand(Map::kMaximumBitField2FastHoleySmiElementValue));
1830 bgt(fail); 1830 bgt(fail);
1831 } 1831 }
1832 1832
1833 1833
1834 void MacroAssembler::StoreNumberToDoubleElements( 1834 void MacroAssembler::StoreNumberToDoubleElements(
1835 Register value_reg, Register key_reg, Register elements_reg, 1835 Register value_reg, Register key_reg, Register elements_reg,
1836 Register scratch1, DoubleRegister double_scratch, Label* fail, 1836 Register scratch1, DoubleRegister double_scratch, Label* fail,
1837 int elements_offset) { 1837 int elements_offset) {
1838 DCHECK(!AreAliased(value_reg, key_reg, elements_reg, scratch1));
1838 Label smi_value, store; 1839 Label smi_value, store;
1839 1840
1840 // Handle smi values specially. 1841 // Handle smi values specially.
1841 JumpIfSmi(value_reg, &smi_value); 1842 JumpIfSmi(value_reg, &smi_value);
1842 1843
1843 // Ensure that the object is a heap number 1844 // Ensure that the object is a heap number
1844 CheckMap(value_reg, scratch1, isolate()->factory()->heap_number_map(), fail, 1845 CheckMap(value_reg, scratch1, isolate()->factory()->heap_number_map(), fail,
1845 DONT_DO_SMI_CHECK); 1846 DONT_DO_SMI_CHECK);
1846 1847
1847 lfd(double_scratch, FieldMemOperand(value_reg, HeapNumber::kValueOffset)); 1848 lfd(double_scratch, FieldMemOperand(value_reg, HeapNumber::kValueOffset));
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after
4314 LoadP(current, FieldMemOperand(current, Map::kPrototypeOffset)); 4315 LoadP(current, FieldMemOperand(current, Map::kPrototypeOffset));
4315 CompareRoot(current, Heap::kNullValueRootIndex); 4316 CompareRoot(current, Heap::kNullValueRootIndex);
4316 bne(&loop_again); 4317 bne(&loop_again);
4317 4318
4318 bind(&end); 4319 bind(&end);
4319 } 4320 }
4320 4321
4321 4322
4322 #ifdef DEBUG 4323 #ifdef DEBUG
4323 bool AreAliased(Register reg1, Register reg2, Register reg3, Register reg4, 4324 bool AreAliased(Register reg1, Register reg2, Register reg3, Register reg4,
4324 Register reg5, Register reg6, Register reg7, Register reg8) { 4325 Register reg5, Register reg6, Register reg7, Register reg8,
4326 Register reg9, Register reg10) {
4325 int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + reg3.is_valid() + 4327 int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + reg3.is_valid() +
4326 reg4.is_valid() + reg5.is_valid() + reg6.is_valid() + 4328 reg4.is_valid() + reg5.is_valid() + reg6.is_valid() +
4327 reg7.is_valid() + reg8.is_valid(); 4329 reg7.is_valid() + reg8.is_valid() + reg9.is_valid() +
4330 reg10.is_valid();
4328 4331
4329 RegList regs = 0; 4332 RegList regs = 0;
4330 if (reg1.is_valid()) regs |= reg1.bit(); 4333 if (reg1.is_valid()) regs |= reg1.bit();
4331 if (reg2.is_valid()) regs |= reg2.bit(); 4334 if (reg2.is_valid()) regs |= reg2.bit();
4332 if (reg3.is_valid()) regs |= reg3.bit(); 4335 if (reg3.is_valid()) regs |= reg3.bit();
4333 if (reg4.is_valid()) regs |= reg4.bit(); 4336 if (reg4.is_valid()) regs |= reg4.bit();
4334 if (reg5.is_valid()) regs |= reg5.bit(); 4337 if (reg5.is_valid()) regs |= reg5.bit();
4335 if (reg6.is_valid()) regs |= reg6.bit(); 4338 if (reg6.is_valid()) regs |= reg6.bit();
4336 if (reg7.is_valid()) regs |= reg7.bit(); 4339 if (reg7.is_valid()) regs |= reg7.bit();
4337 if (reg8.is_valid()) regs |= reg8.bit(); 4340 if (reg8.is_valid()) regs |= reg8.bit();
4341 if (reg9.is_valid()) regs |= reg9.bit();
4342 if (reg10.is_valid()) regs |= reg10.bit();
4338 int n_of_non_aliasing_regs = NumRegs(regs); 4343 int n_of_non_aliasing_regs = NumRegs(regs);
4339 4344
4340 return n_of_valid_regs != n_of_non_aliasing_regs; 4345 return n_of_valid_regs != n_of_non_aliasing_regs;
4341 } 4346 }
4342 #endif 4347 #endif
4343 4348
4344 4349
4345 CodePatcher::CodePatcher(Isolate* isolate, byte* address, int instructions, 4350 CodePatcher::CodePatcher(Isolate* isolate, byte* address, int instructions,
4346 FlushICache flush_cache) 4351 FlushICache flush_cache)
4347 : address_(address), 4352 : address_(address),
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 } 4409 }
4405 if (mag.shift > 0) srawi(result, result, mag.shift); 4410 if (mag.shift > 0) srawi(result, result, mag.shift);
4406 ExtractBit(r0, dividend, 31); 4411 ExtractBit(r0, dividend, 31);
4407 add(result, result, r0); 4412 add(result, result, r0);
4408 } 4413 }
4409 4414
4410 } // namespace internal 4415 } // namespace internal
4411 } // namespace v8 4416 } // namespace v8
4412 4417
4413 #endif // V8_TARGET_ARCH_PPC 4418 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | test/mjsunit/regress/regress-crbug-571370.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698