OLD | NEW |
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 4441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4452 __ sll(scratch4, key_reg, kDoubleSizeLog2 - kSmiTagSize); | 4452 __ sll(scratch4, key_reg, kDoubleSizeLog2 - kSmiTagSize); |
4453 __ Addu(scratch, scratch, scratch4); | 4453 __ Addu(scratch, scratch, scratch4); |
4454 // scratch is now effective address of the double element | 4454 // scratch is now effective address of the double element |
4455 | 4455 |
4456 FloatingPointHelper::Destination destination; | 4456 FloatingPointHelper::Destination destination; |
4457 if (CpuFeatures::IsSupported(FPU)) { | 4457 if (CpuFeatures::IsSupported(FPU)) { |
4458 destination = FloatingPointHelper::kFPURegisters; | 4458 destination = FloatingPointHelper::kFPURegisters; |
4459 } else { | 4459 } else { |
4460 destination = FloatingPointHelper::kCoreRegisters; | 4460 destination = FloatingPointHelper::kCoreRegisters; |
4461 } | 4461 } |
4462 __ SmiUntag(value_reg, value_reg); | 4462 |
| 4463 Register untagged_value = receiver_reg; |
| 4464 __ SmiUntag(untagged_value, value_reg); |
4463 FloatingPointHelper::ConvertIntToDouble( | 4465 FloatingPointHelper::ConvertIntToDouble( |
4464 masm, value_reg, destination, | 4466 masm, |
4465 f0, mantissa_reg, exponent_reg, // These are: double_dst, dst1, dst2. | 4467 untagged_value, |
4466 scratch4, f2); // These are: scratch2, single_scratch. | 4468 destination, |
| 4469 f0, |
| 4470 mantissa_reg, |
| 4471 exponent_reg, |
| 4472 scratch4, |
| 4473 f2); |
4467 if (destination == FloatingPointHelper::kFPURegisters) { | 4474 if (destination == FloatingPointHelper::kFPURegisters) { |
4468 CpuFeatures::Scope scope(FPU); | 4475 CpuFeatures::Scope scope(FPU); |
4469 __ sdc1(f0, MemOperand(scratch, 0)); | 4476 __ sdc1(f0, MemOperand(scratch, 0)); |
4470 } else { | 4477 } else { |
4471 __ sw(mantissa_reg, MemOperand(scratch, 0)); | 4478 __ sw(mantissa_reg, MemOperand(scratch, 0)); |
4472 __ sw(exponent_reg, MemOperand(scratch, Register::kSizeInBytes)); | 4479 __ sw(exponent_reg, MemOperand(scratch, Register::kSizeInBytes)); |
4473 } | 4480 } |
4474 __ Ret(); | 4481 __ Ret(); |
4475 | 4482 |
4476 // Handle store cache miss, replacing the ic with the generic stub. | 4483 // Handle store cache miss, replacing the ic with the generic stub. |
4477 __ bind(&miss_force_generic); | 4484 __ bind(&miss_force_generic); |
4478 Handle<Code> ic = | 4485 Handle<Code> ic = |
4479 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 4486 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
4480 __ Jump(ic, RelocInfo::CODE_TARGET); | 4487 __ Jump(ic, RelocInfo::CODE_TARGET); |
4481 } | 4488 } |
4482 | 4489 |
4483 | 4490 |
4484 #undef __ | 4491 #undef __ |
4485 | 4492 |
4486 } } // namespace v8::internal | 4493 } } // namespace v8::internal |
4487 | 4494 |
4488 #endif // V8_TARGET_ARCH_MIPS | 4495 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |