| Index: src/ppc/macro-assembler-ppc.cc
|
| diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc
|
| index d7697f0623eb91951cad3807f3a8bb9a6d455b9a..fde79df04c76aec63d22db311b238f09c8123735 100644
|
| --- a/src/ppc/macro-assembler-ppc.cc
|
| +++ b/src/ppc/macro-assembler-ppc.cc
|
| @@ -2626,78 +2626,6 @@ void MacroAssembler::JumpIfNotHeapNumber(Register object,
|
| }
|
|
|
|
|
| -void MacroAssembler::LookupNumberStringCache(Register object, Register result,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Register scratch3,
|
| - Label* not_found) {
|
| - // Use of registers. Register result is used as a temporary.
|
| - Register number_string_cache = result;
|
| - Register mask = scratch3;
|
| -
|
| - // Load the number string cache.
|
| - LoadRoot(number_string_cache, Heap::kNumberStringCacheRootIndex);
|
| -
|
| - // Make the hash mask from the length of the number string cache. It
|
| - // contains two elements (number and string) for each cache entry.
|
| - LoadP(mask, FieldMemOperand(number_string_cache, FixedArray::kLengthOffset));
|
| - // Divide length by two (length is a smi).
|
| - ShiftRightArithImm(mask, mask, kSmiTagSize + kSmiShiftSize + 1);
|
| - subi(mask, mask, Operand(1)); // Make mask.
|
| -
|
| - // Calculate the entry in the number string cache. The hash value in the
|
| - // number string cache for smis is just the smi value, and the hash for
|
| - // doubles is the xor of the upper and lower words. See
|
| - // Heap::GetNumberStringCache.
|
| - Label is_smi;
|
| - Label load_result_from_cache;
|
| - JumpIfSmi(object, &is_smi);
|
| - CheckMap(object, scratch1, Heap::kHeapNumberMapRootIndex, not_found,
|
| - DONT_DO_SMI_CHECK);
|
| -
|
| - STATIC_ASSERT(8 == kDoubleSize);
|
| - lwz(scratch1, FieldMemOperand(object, HeapNumber::kExponentOffset));
|
| - lwz(scratch2, FieldMemOperand(object, HeapNumber::kMantissaOffset));
|
| - xor_(scratch1, scratch1, scratch2);
|
| - and_(scratch1, scratch1, mask);
|
| -
|
| - // Calculate address of entry in string cache: each entry consists
|
| - // of two pointer sized fields.
|
| - ShiftLeftImm(scratch1, scratch1, Operand(kPointerSizeLog2 + 1));
|
| - add(scratch1, number_string_cache, scratch1);
|
| -
|
| - Register probe = mask;
|
| - LoadP(probe, FieldMemOperand(scratch1, FixedArray::kHeaderSize));
|
| - JumpIfSmi(probe, not_found);
|
| - lfd(d0, FieldMemOperand(object, HeapNumber::kValueOffset));
|
| - lfd(d1, FieldMemOperand(probe, HeapNumber::kValueOffset));
|
| - fcmpu(d0, d1);
|
| - bne(not_found); // The cache did not contain this value.
|
| - b(&load_result_from_cache);
|
| -
|
| - bind(&is_smi);
|
| - Register scratch = scratch1;
|
| - SmiUntag(scratch, object);
|
| - and_(scratch, mask, scratch);
|
| - // Calculate address of entry in string cache: each entry consists
|
| - // of two pointer sized fields.
|
| - ShiftLeftImm(scratch, scratch, Operand(kPointerSizeLog2 + 1));
|
| - add(scratch, number_string_cache, scratch);
|
| -
|
| - // Check if the entry is the smi we are looking for.
|
| - LoadP(probe, FieldMemOperand(scratch, FixedArray::kHeaderSize));
|
| - cmp(object, probe);
|
| - bne(not_found);
|
| -
|
| - // Get the result from the cache.
|
| - bind(&load_result_from_cache);
|
| - LoadP(result,
|
| - FieldMemOperand(scratch, FixedArray::kHeaderSize + kPointerSize));
|
| - IncrementCounter(isolate()->counters()->number_to_string_native(), 1,
|
| - scratch1, scratch2);
|
| -}
|
| -
|
| -
|
| void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
|
| Register first, Register second, Register scratch1, Register scratch2,
|
| Label* failure) {
|
|
|