| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 4451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4462 | 4462 |
| 4463 // Get the value from the frame. | 4463 // Get the value from the frame. |
| 4464 Register tos = frame_->PopToRegister(); | 4464 Register tos = frame_->PopToRegister(); |
| 4465 | 4465 |
| 4466 // Set the frame for the runtime jump target. The code below jumps to the | 4466 // Set the frame for the runtime jump target. The code below jumps to the |
| 4467 // jump target label so the frame needs to be established before that. | 4467 // jump target label so the frame needs to be established before that. |
| 4468 ASSERT(runtime.entry_frame() == NULL); | 4468 ASSERT(runtime.entry_frame() == NULL); |
| 4469 runtime.set_entry_frame(frame_); | 4469 runtime.set_entry_frame(frame_); |
| 4470 | 4470 |
| 4471 Register heap_number_map = r6; | 4471 Register heap_number_map = r6; |
| 4472 Register new_heap_number = r5; |
| 4472 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); | 4473 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); |
| 4473 | 4474 |
| 4474 // Get the double value from the heap number into vfp register d0. | 4475 // Get the double value from the heap number into vfp register d0. |
| 4475 __ ObjectToDoubleVFPRegister(tos, d0, | 4476 __ ObjectToDoubleVFPRegister(tos, d0, |
| 4476 scratch1, scratch2, heap_number_map, s0, | 4477 scratch1, scratch2, heap_number_map, s0, |
| 4477 runtime.entry_label()); | 4478 runtime.entry_label()); |
| 4478 | 4479 |
| 4479 // Calculate the square root of d0 and place result in a heap number object. | 4480 // Calculate the square root of d0 and place result in a heap number object. |
| 4480 __ vsqrt(d0, d0); | 4481 __ vsqrt(d0, d0); |
| 4481 __ AllocateHeapNumberWithValue( | 4482 __ AllocateHeapNumberWithValue(new_heap_number, |
| 4482 tos, d0, scratch1, scratch2, heap_number_map, runtime.entry_label()); | 4483 d0, |
| 4484 scratch1, scratch2, |
| 4485 heap_number_map, |
| 4486 runtime.entry_label()); |
| 4487 __ mov(tos, Operand(new_heap_number)); |
| 4483 done.Jump(); | 4488 done.Jump(); |
| 4484 | 4489 |
| 4485 runtime.Bind(); | 4490 runtime.Bind(); |
| 4486 // Push back the argument again for the runtime call. | 4491 // Push back the argument again for the runtime call. |
| 4487 frame_->EmitPush(tos); | 4492 frame_->EmitPush(tos); |
| 4488 frame_->CallRuntime(Runtime::kMath_sqrt, 1); | 4493 frame_->CallRuntime(Runtime::kMath_sqrt, 1); |
| 4489 __ Move(tos, r0); | 4494 __ Move(tos, r0); |
| 4490 | 4495 |
| 4491 done.Bind(); | 4496 done.Bind(); |
| 4492 frame_->EmitPush(tos); | 4497 frame_->EmitPush(tos); |
| (...skipping 6764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11257 __ bind(&string_add_runtime); | 11262 __ bind(&string_add_runtime); |
| 11258 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 11263 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
| 11259 } | 11264 } |
| 11260 | 11265 |
| 11261 | 11266 |
| 11262 #undef __ | 11267 #undef __ |
| 11263 | 11268 |
| 11264 } } // namespace v8::internal | 11269 } } // namespace v8::internal |
| 11265 | 11270 |
| 11266 #endif // V8_TARGET_ARCH_ARM | 11271 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |