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 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2970 | 2970 |
2971 CpuFeatures::Scope scope(FPU); | 2971 CpuFeatures::Scope scope(FPU); |
2972 // 0x41300000 is the top half of 1.0 x 2^20 as a double. | 2972 // 0x41300000 is the top half of 1.0 x 2^20 as a double. |
2973 __ li(a1, Operand(0x41300000)); | 2973 __ li(a1, Operand(0x41300000)); |
2974 // Move 0x41300000xxxxxxxx (x = random bits in v0) to FPU. | 2974 // Move 0x41300000xxxxxxxx (x = random bits in v0) to FPU. |
2975 __ Move(f12, v0, a1); | 2975 __ Move(f12, v0, a1); |
2976 // Move 0x4130000000000000 to FPU. | 2976 // Move 0x4130000000000000 to FPU. |
2977 __ Move(f14, zero_reg, a1); | 2977 __ Move(f14, zero_reg, a1); |
2978 // Subtract and store the result in the heap number. | 2978 // Subtract and store the result in the heap number. |
2979 __ sub_d(f0, f12, f14); | 2979 __ sub_d(f0, f12, f14); |
2980 __ sdc1(f0, MemOperand(s0, HeapNumber::kValueOffset - kHeapObjectTag)); | 2980 __ sdc1(f0, FieldMemOperand(s0, HeapNumber::kValueOffset)); |
2981 __ mov(v0, s0); | 2981 __ mov(v0, s0); |
2982 } else { | 2982 } else { |
2983 __ PrepareCallCFunction(2, a0); | 2983 __ PrepareCallCFunction(2, a0); |
2984 __ mov(a0, s0); | 2984 __ mov(a0, s0); |
2985 __ lw(a1, ContextOperand(cp, Context::GLOBAL_INDEX)); | 2985 __ lw(a1, ContextOperand(cp, Context::GLOBAL_INDEX)); |
2986 __ lw(a1, FieldMemOperand(a1, GlobalObject::kGlobalContextOffset)); | 2986 __ lw(a1, FieldMemOperand(a1, GlobalObject::kGlobalContextOffset)); |
2987 __ CallCFunction( | 2987 __ CallCFunction( |
2988 ExternalReference::fill_heap_number_with_random_function(isolate()), 2); | 2988 ExternalReference::fill_heap_number_with_random_function(isolate()), 2); |
2989 } | 2989 } |
2990 | 2990 |
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4559 *context_length = 0; | 4559 *context_length = 0; |
4560 return previous_; | 4560 return previous_; |
4561 } | 4561 } |
4562 | 4562 |
4563 | 4563 |
4564 #undef __ | 4564 #undef __ |
4565 | 4565 |
4566 } } // namespace v8::internal | 4566 } } // namespace v8::internal |
4567 | 4567 |
4568 #endif // V8_TARGET_ARCH_MIPS | 4568 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |