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 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3403 // -- ra : return address | 3403 // -- ra : return address |
3404 // ----------------------------------- | 3404 // ----------------------------------- |
3405 MaybeObject* maybe_stub = | 3405 MaybeObject* maybe_stub = |
3406 KeyedStoreExternalArrayStub(array_type).TryGetCode(); | 3406 KeyedStoreExternalArrayStub(array_type).TryGetCode(); |
3407 Code* stub; | 3407 Code* stub; |
3408 if (!maybe_stub->To(&stub)) return maybe_stub; | 3408 if (!maybe_stub->To(&stub)) return maybe_stub; |
3409 __ DispatchMap(a2, | 3409 __ DispatchMap(a2, |
3410 a3, | 3410 a3, |
3411 Handle<Map>(receiver->map()), | 3411 Handle<Map>(receiver->map()), |
3412 Handle<Code>(stub), | 3412 Handle<Code>(stub), |
3413 DONT_DO_SMI_CHECK); | 3413 DO_SMI_CHECK); |
3414 | 3414 |
3415 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); | 3415 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); |
3416 __ Jump(ic, RelocInfo::CODE_TARGET); | 3416 __ Jump(ic, RelocInfo::CODE_TARGET); |
3417 | 3417 |
3418 return GetCode(); | 3418 return GetCode(); |
3419 } | 3419 } |
3420 | 3420 |
3421 | 3421 |
3422 #undef __ | 3422 #undef __ |
3423 #define __ ACCESS_MASM(masm) | 3423 #define __ ACCESS_MASM(masm) |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3559 __ LoadRoot(t1, Heap::kHeapNumberMapRootIndex); | 3559 __ LoadRoot(t1, Heap::kHeapNumberMapRootIndex); |
3560 __ AllocateHeapNumber(v0, a3, t0, t1, &slow); | 3560 __ AllocateHeapNumber(v0, a3, t0, t1, &slow); |
3561 | 3561 |
3562 if (CpuFeatures::IsSupported(FPU)) { | 3562 if (CpuFeatures::IsSupported(FPU)) { |
3563 CpuFeatures::Scope scope(FPU); | 3563 CpuFeatures::Scope scope(FPU); |
3564 __ mtc1(value, f0); | 3564 __ mtc1(value, f0); |
3565 __ cvt_d_w(f0, f0); | 3565 __ cvt_d_w(f0, f0); |
3566 __ sdc1(f0, MemOperand(v0, HeapNumber::kValueOffset - kHeapObjectTag)); | 3566 __ sdc1(f0, MemOperand(v0, HeapNumber::kValueOffset - kHeapObjectTag)); |
3567 __ Ret(); | 3567 __ Ret(); |
3568 } else { | 3568 } else { |
3569 WriteInt32ToHeapNumberStub stub(value, v0, t2, t3); | 3569 Register dst1 = t2; |
3570 __ TailCallStub(&stub); | 3570 Register dst2 = t3; |
| 3571 FloatingPointHelper::Destination dest = |
| 3572 FloatingPointHelper::kCoreRegisters; |
| 3573 FloatingPointHelper::ConvertIntToDouble(masm, |
| 3574 value, |
| 3575 dest, |
| 3576 f0, |
| 3577 dst1, |
| 3578 dst2, |
| 3579 t1, |
| 3580 f2); |
| 3581 __ sw(dst1, FieldMemOperand(v0, HeapNumber::kMantissaOffset)); |
| 3582 __ sw(dst2, FieldMemOperand(v0, HeapNumber::kExponentOffset)); |
| 3583 __ Ret(); |
3571 } | 3584 } |
3572 } else if (array_type == kExternalUnsignedIntArray) { | 3585 } else if (array_type == kExternalUnsignedIntArray) { |
3573 // The test is different for unsigned int values. Since we need | 3586 // The test is different for unsigned int values. Since we need |
3574 // the value to be in the range of a positive smi, we can't | 3587 // the value to be in the range of a positive smi, we can't |
3575 // handle either of the top two bits being set in the value. | 3588 // handle either of the top two bits being set in the value. |
3576 if (CpuFeatures::IsSupported(FPU)) { | 3589 if (CpuFeatures::IsSupported(FPU)) { |
3577 CpuFeatures::Scope scope(FPU); | 3590 CpuFeatures::Scope scope(FPU); |
3578 Label pl_box_int; | 3591 Label pl_box_int; |
3579 __ And(t2, value, Operand(0xC0000000)); | 3592 __ And(t2, value, Operand(0xC0000000)); |
3580 __ Branch(&pl_box_int, ne, t2, Operand(zero_reg)); | 3593 __ Branch(&pl_box_int, ne, t2, Operand(zero_reg)); |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4252 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 4265 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
4253 __ Jump(ic, RelocInfo::CODE_TARGET); | 4266 __ Jump(ic, RelocInfo::CODE_TARGET); |
4254 } | 4267 } |
4255 | 4268 |
4256 | 4269 |
4257 #undef __ | 4270 #undef __ |
4258 | 4271 |
4259 } } // namespace v8::internal | 4272 } } // namespace v8::internal |
4260 | 4273 |
4261 #endif // V8_TARGET_ARCH_MIPS | 4274 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |