| 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 4518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4529 | 4529 |
| 4530 // Get the value from the frame. | 4530 // Get the value from the frame. |
| 4531 Register tos = frame_->PopToRegister(); | 4531 Register tos = frame_->PopToRegister(); |
| 4532 | 4532 |
| 4533 // Set the frame for the runtime jump target. The code below jumps to the | 4533 // Set the frame for the runtime jump target. The code below jumps to the |
| 4534 // jump target label so the frame needs to be established before that. | 4534 // jump target label so the frame needs to be established before that. |
| 4535 ASSERT(runtime.entry_frame() == NULL); | 4535 ASSERT(runtime.entry_frame() == NULL); |
| 4536 runtime.set_entry_frame(frame_); | 4536 runtime.set_entry_frame(frame_); |
| 4537 | 4537 |
| 4538 Register heap_number_map = r6; | 4538 Register heap_number_map = r6; |
| 4539 Register new_heap_number = r5; |
| 4539 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); | 4540 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); |
| 4540 | 4541 |
| 4541 // Get the double value from the heap number into vfp register d0. | 4542 // Get the double value from the heap number into vfp register d0. |
| 4542 __ ObjectToDoubleVFPRegister(tos, d0, | 4543 __ ObjectToDoubleVFPRegister(tos, d0, |
| 4543 scratch1, scratch2, heap_number_map, s0, | 4544 scratch1, scratch2, heap_number_map, s0, |
| 4544 runtime.entry_label()); | 4545 runtime.entry_label()); |
| 4545 | 4546 |
| 4546 // Calculate the square root of d0 and place result in a heap number object. | 4547 // Calculate the square root of d0 and place result in a heap number object. |
| 4547 __ vsqrt(d0, d0); | 4548 __ vsqrt(d0, d0); |
| 4548 __ AllocateHeapNumberWithValue( | 4549 __ AllocateHeapNumberWithValue(new_heap_number, |
| 4549 tos, d0, scratch1, scratch2, heap_number_map, runtime.entry_label()); | 4550 d0, |
| 4551 scratch1, scratch2, |
| 4552 heap_number_map, |
| 4553 runtime.entry_label()); |
| 4554 __ mov(tos, Operand(new_heap_number)); |
| 4550 done.Jump(); | 4555 done.Jump(); |
| 4551 | 4556 |
| 4552 runtime.Bind(); | 4557 runtime.Bind(); |
| 4553 // Push back the argument again for the runtime call. | 4558 // Push back the argument again for the runtime call. |
| 4554 frame_->EmitPush(tos); | 4559 frame_->EmitPush(tos); |
| 4555 frame_->CallRuntime(Runtime::kMath_sqrt, 1); | 4560 frame_->CallRuntime(Runtime::kMath_sqrt, 1); |
| 4556 __ Move(tos, r0); | 4561 __ Move(tos, r0); |
| 4557 | 4562 |
| 4558 done.Bind(); | 4563 done.Bind(); |
| 4559 frame_->EmitPush(tos); | 4564 frame_->EmitPush(tos); |
| (...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7083 BinaryOpIC::GetName(runtime_operands_type_)); | 7088 BinaryOpIC::GetName(runtime_operands_type_)); |
| 7084 return name_; | 7089 return name_; |
| 7085 } | 7090 } |
| 7086 | 7091 |
| 7087 | 7092 |
| 7088 #undef __ | 7093 #undef __ |
| 7089 | 7094 |
| 7090 } } // namespace v8::internal | 7095 } } // namespace v8::internal |
| 7091 | 7096 |
| 7092 #endif // V8_TARGET_ARCH_ARM | 7097 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |