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

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 7779006: MIPS: Fix KeyedStoreStubCompiler::GenerateStoreFastDoubleElement() (Closed)
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4410 matching lines...) Expand 10 before | Expand all | Expand 10 after
4421 __ Branch(&maybe_nan, ge, exponent_reg, Operand(scratch)); 4421 __ Branch(&maybe_nan, ge, exponent_reg, Operand(scratch));
4422 4422
4423 __ lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset)); 4423 __ lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset));
4424 4424
4425 __ bind(&have_double_value); 4425 __ bind(&have_double_value);
4426 __ sll(scratch4, key_reg, kDoubleSizeLog2 - kSmiTagSize); 4426 __ sll(scratch4, key_reg, kDoubleSizeLog2 - kSmiTagSize);
4427 __ Addu(scratch, elements_reg, Operand(scratch4)); 4427 __ Addu(scratch, elements_reg, Operand(scratch4));
4428 __ sw(mantissa_reg, FieldMemOperand(scratch, FixedDoubleArray::kHeaderSize)); 4428 __ sw(mantissa_reg, FieldMemOperand(scratch, FixedDoubleArray::kHeaderSize));
4429 uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32); 4429 uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32);
4430 __ sw(exponent_reg, FieldMemOperand(scratch, offset)); 4430 __ sw(exponent_reg, FieldMemOperand(scratch, offset));
4431 __ Ret(); 4431 __ Ret(USE_DELAY_SLOT);
4432 __ mov(v0, value_reg); // In delay slot.
4432 4433
4433 __ bind(&maybe_nan); 4434 __ bind(&maybe_nan);
4434 // Could be NaN or Infinity. If fraction is not zero, it's NaN, otherwise 4435 // Could be NaN or Infinity. If fraction is not zero, it's NaN, otherwise
4435 // it's an Infinity, and the non-NaN code path applies. 4436 // it's an Infinity, and the non-NaN code path applies.
4436 __ li(scratch, Operand(kNaNOrInfinityLowerBoundUpper32)); 4437 __ li(scratch, Operand(kNaNOrInfinityLowerBoundUpper32));
4437 __ Branch(&is_nan, gt, exponent_reg, Operand(scratch)); 4438 __ Branch(&is_nan, gt, exponent_reg, Operand(scratch));
4438 __ lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset)); 4439 __ lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset));
4439 __ Branch(&have_double_value, eq, mantissa_reg, Operand(zero_reg)); 4440 __ Branch(&have_double_value, eq, mantissa_reg, Operand(zero_reg));
4440 4441
4441 __ bind(&is_nan); 4442 __ bind(&is_nan);
(...skipping 29 matching lines...) Expand all
4471 exponent_reg, 4472 exponent_reg,
4472 scratch4, 4473 scratch4,
4473 f2); 4474 f2);
4474 if (destination == FloatingPointHelper::kFPURegisters) { 4475 if (destination == FloatingPointHelper::kFPURegisters) {
4475 CpuFeatures::Scope scope(FPU); 4476 CpuFeatures::Scope scope(FPU);
4476 __ sdc1(f0, MemOperand(scratch, 0)); 4477 __ sdc1(f0, MemOperand(scratch, 0));
4477 } else { 4478 } else {
4478 __ sw(mantissa_reg, MemOperand(scratch, 0)); 4479 __ sw(mantissa_reg, MemOperand(scratch, 0));
4479 __ sw(exponent_reg, MemOperand(scratch, Register::kSizeInBytes)); 4480 __ sw(exponent_reg, MemOperand(scratch, Register::kSizeInBytes));
4480 } 4481 }
4481 __ Ret(); 4482 __ Ret(USE_DELAY_SLOT);
4483 __ mov(v0, value_reg); // In delay slot.
4482 4484
4483 // Handle store cache miss, replacing the ic with the generic stub. 4485 // Handle store cache miss, replacing the ic with the generic stub.
4484 __ bind(&miss_force_generic); 4486 __ bind(&miss_force_generic);
4485 Handle<Code> ic = 4487 Handle<Code> ic =
4486 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 4488 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
4487 __ Jump(ic, RelocInfo::CODE_TARGET); 4489 __ Jump(ic, RelocInfo::CODE_TARGET);
4488 } 4490 }
4489 4491
4490 4492
4491 #undef __ 4493 #undef __
4492 4494
4493 } } // namespace v8::internal 4495 } } // namespace v8::internal
4494 4496
4495 #endif // V8_TARGET_ARCH_MIPS 4497 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698