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 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3570 __ mov(r0, r5); | 3570 __ mov(r0, r5); |
3571 | 3571 |
3572 if (CpuFeatures::IsSupported(VFP3)) { | 3572 if (CpuFeatures::IsSupported(VFP3)) { |
3573 CpuFeatures::Scope scope(VFP3); | 3573 CpuFeatures::Scope scope(VFP3); |
3574 __ vmov(s0, value); | 3574 __ vmov(s0, value); |
3575 __ vcvt_f64_s32(d0, s0); | 3575 __ vcvt_f64_s32(d0, s0); |
3576 __ sub(r3, r0, Operand(kHeapObjectTag)); | 3576 __ sub(r3, r0, Operand(kHeapObjectTag)); |
3577 __ vstr(d0, r3, HeapNumber::kValueOffset); | 3577 __ vstr(d0, r3, HeapNumber::kValueOffset); |
3578 __ Ret(); | 3578 __ Ret(); |
3579 } else { | 3579 } else { |
3580 WriteInt32ToHeapNumberStub stub(value, r0, r3); | 3580 Register dst1 = r1; |
3581 __ TailCallStub(&stub); | 3581 Register dst2 = r3; |
| 3582 FloatingPointHelper::Destination dest = |
| 3583 FloatingPointHelper::kCoreRegisters; |
| 3584 FloatingPointHelper::ConvertIntToDouble(masm, |
| 3585 value, |
| 3586 dest, |
| 3587 d0, |
| 3588 dst1, |
| 3589 dst2, |
| 3590 r9, |
| 3591 s0); |
| 3592 __ str(dst1, FieldMemOperand(r0, HeapNumber::kMantissaOffset)); |
| 3593 __ str(dst2, FieldMemOperand(r0, HeapNumber::kExponentOffset)); |
| 3594 __ Ret(); |
3582 } | 3595 } |
3583 } else if (array_type == kExternalUnsignedIntArray) { | 3596 } else if (array_type == kExternalUnsignedIntArray) { |
3584 // The test is different for unsigned int values. Since we need | 3597 // The test is different for unsigned int values. Since we need |
3585 // the value to be in the range of a positive smi, we can't | 3598 // the value to be in the range of a positive smi, we can't |
3586 // handle either of the top two bits being set in the value. | 3599 // handle either of the top two bits being set in the value. |
3587 if (CpuFeatures::IsSupported(VFP3)) { | 3600 if (CpuFeatures::IsSupported(VFP3)) { |
3588 CpuFeatures::Scope scope(VFP3); | 3601 CpuFeatures::Scope scope(VFP3); |
3589 Label box_int, done; | 3602 Label box_int, done; |
3590 __ tst(value, Operand(0xC0000000)); | 3603 __ tst(value, Operand(0xC0000000)); |
3591 __ b(ne, &box_int); | 3604 __ b(ne, &box_int); |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4209 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 4222 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
4210 __ Jump(ic, RelocInfo::CODE_TARGET); | 4223 __ Jump(ic, RelocInfo::CODE_TARGET); |
4211 } | 4224 } |
4212 | 4225 |
4213 | 4226 |
4214 #undef __ | 4227 #undef __ |
4215 | 4228 |
4216 } } // namespace v8::internal | 4229 } } // namespace v8::internal |
4217 | 4230 |
4218 #endif // V8_TARGET_ARCH_ARM | 4231 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |