OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3011 __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); | 3011 __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); |
3012 | 3012 |
3013 CpuFeatures::Scope scope(VFP2); | 3013 CpuFeatures::Scope scope(VFP2); |
3014 // 0x41300000 is the top half of 1.0 x 2^20 as a double. | 3014 // 0x41300000 is the top half of 1.0 x 2^20 as a double. |
3015 // Create this constant using mov/orr to avoid PC relative load. | 3015 // Create this constant using mov/orr to avoid PC relative load. |
3016 __ mov(r1, Operand(0x41000000)); | 3016 __ mov(r1, Operand(0x41000000)); |
3017 __ orr(r1, r1, Operand(0x300000)); | 3017 __ orr(r1, r1, Operand(0x300000)); |
3018 // Move 0x41300000xxxxxxxx (x = random bits) to VFP. | 3018 // Move 0x41300000xxxxxxxx (x = random bits) to VFP. |
3019 __ vmov(d7, r0, r1); | 3019 __ vmov(d7, r0, r1); |
3020 // Move 0x4130000000000000 to VFP. | 3020 // Move 0x4130000000000000 to VFP. |
3021 __ mov(r0, Operand(0, RelocInfo::NONE)); | 3021 __ mov(r0, Operand(0, RelocInfo::NONE32)); |
3022 __ vmov(d8, r0, r1); | 3022 __ vmov(d8, r0, r1); |
3023 // Subtract and store the result in the heap number. | 3023 // Subtract and store the result in the heap number. |
3024 __ vsub(d7, d7, d8); | 3024 __ vsub(d7, d7, d8); |
3025 __ sub(r0, r4, Operand(kHeapObjectTag)); | 3025 __ sub(r0, r4, Operand(kHeapObjectTag)); |
3026 __ vstr(d7, r0, HeapNumber::kValueOffset); | 3026 __ vstr(d7, r0, HeapNumber::kValueOffset); |
3027 __ mov(r0, r4); | 3027 __ mov(r0, r4); |
3028 } else { | 3028 } else { |
3029 __ PrepareCallCFunction(2, r0); | 3029 __ PrepareCallCFunction(2, r0); |
3030 __ ldr(r1, | 3030 __ ldr(r1, |
3031 ContextOperand(context_register(), Context::GLOBAL_OBJECT_INDEX)); | 3031 ContextOperand(context_register(), Context::GLOBAL_OBJECT_INDEX)); |
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4553 *context_length = 0; | 4553 *context_length = 0; |
4554 return previous_; | 4554 return previous_; |
4555 } | 4555 } |
4556 | 4556 |
4557 | 4557 |
4558 #undef __ | 4558 #undef __ |
4559 | 4559 |
4560 } } // namespace v8::internal | 4560 } } // namespace v8::internal |
4561 | 4561 |
4562 #endif // V8_TARGET_ARCH_ARM | 4562 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |