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 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); | 2654 addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); |
2655 } | 2655 } |
2656 | 2656 |
2657 | 2657 |
2658 void MacroAssembler::JumpToHandlerEntry() { | 2658 void MacroAssembler::JumpToHandlerEntry() { |
2659 // Compute the handler entry address and jump to it. The handler table is | 2659 // Compute the handler entry address and jump to it. The handler table is |
2660 // a fixed array of (smi-tagged) code offsets. | 2660 // a fixed array of (smi-tagged) code offsets. |
2661 // rax = exception, rdi = code object, rdx = state. | 2661 // rax = exception, rdi = code object, rdx = state. |
2662 movq(rbx, FieldOperand(rdi, Code::kHandlerTableOffset)); | 2662 movq(rbx, FieldOperand(rdi, Code::kHandlerTableOffset)); |
2663 shr(rdx, Immediate(StackHandler::kKindWidth)); | 2663 shr(rdx, Immediate(StackHandler::kKindWidth)); |
2664 movq(rdx, FieldOperand(rbx, rdx, times_8, FixedArray::kHeaderSize)); | 2664 movq(rdx, |
| 2665 FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize)); |
2665 SmiToInteger64(rdx, rdx); | 2666 SmiToInteger64(rdx, rdx); |
2666 lea(rdi, FieldOperand(rdi, rdx, times_1, Code::kHeaderSize)); | 2667 lea(rdi, FieldOperand(rdi, rdx, times_1, Code::kHeaderSize)); |
2667 jmp(rdi); | 2668 jmp(rdi); |
2668 } | 2669 } |
2669 | 2670 |
2670 | 2671 |
2671 void MacroAssembler::Throw(Register value) { | 2672 void MacroAssembler::Throw(Register value) { |
2672 // Adjust this code if not the case. | 2673 // Adjust this code if not the case. |
2673 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); | 2674 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); |
2674 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); | 2675 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4700 j(greater, &no_info_available); | 4701 j(greater, &no_info_available); |
4701 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4702 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
4702 Heap::kAllocationSiteInfoMapRootIndex); | 4703 Heap::kAllocationSiteInfoMapRootIndex); |
4703 bind(&no_info_available); | 4704 bind(&no_info_available); |
4704 } | 4705 } |
4705 | 4706 |
4706 | 4707 |
4707 } } // namespace v8::internal | 4708 } } // namespace v8::internal |
4708 | 4709 |
4709 #endif // V8_TARGET_ARCH_X64 | 4710 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |