OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
564 // from an external reference instead of inlining the call target address | 564 // from an external reference instead of inlining the call target address |
565 // directly in the code, because the builtin stubs may not have been | 565 // directly in the code, because the builtin stubs may not have been |
566 // generated yet at the time this code is generated. | 566 // generated yet at the time this code is generated. |
567 if (is_construct) { | 567 if (is_construct) { |
568 ExternalReference construct_entry(Builtins::JSConstructEntryTrampoline); | 568 ExternalReference construct_entry(Builtins::JSConstructEntryTrampoline); |
569 __ load_rax(construct_entry); | 569 __ load_rax(construct_entry); |
570 } else { | 570 } else { |
571 ExternalReference entry(Builtins::JSEntryTrampoline); | 571 ExternalReference entry(Builtins::JSEntryTrampoline); |
572 __ load_rax(entry); | 572 __ load_rax(entry); |
573 } | 573 } |
574 __ call(FieldOperand(rax, Code::kHeaderSize)); | 574 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize)); |
William Hesse
2009/06/11 13:04:24
Can you use a Call() from MacroAssembler, that inc
Lasse Reichstein
2009/06/11 13:16:05
I would rather not.
The expected meaning of a Call
| |
575 __ call(kScratchRegister); | |
575 | 576 |
576 // Unlink this frame from the handler chain. | 577 // Unlink this frame from the handler chain. |
577 __ movq(kScratchRegister, ExternalReference(Top::k_handler_address)); | 578 __ movq(kScratchRegister, ExternalReference(Top::k_handler_address)); |
578 __ pop(Operand(kScratchRegister, 0)); | 579 __ pop(Operand(kScratchRegister, 0)); |
579 // Pop next_sp. | 580 // Pop next_sp. |
580 __ addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); | 581 __ addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); |
581 | 582 |
582 // Restore the top frame descriptor from the stack. | 583 // Restore the top frame descriptor from the stack. |
583 __ bind(&exit); | 584 __ bind(&exit); |
584 __ movq(kScratchRegister, ExternalReference(Top::k_c_entry_fp_address)); | 585 __ movq(kScratchRegister, ExternalReference(Top::k_c_entry_fp_address)); |
(...skipping 11 matching lines...) Expand all Loading... | |
596 | 597 |
597 // Restore frame pointer and return. | 598 // Restore frame pointer and return. |
598 __ pop(rbp); | 599 __ pop(rbp); |
599 __ ret(0); | 600 __ ret(0); |
600 } | 601 } |
601 | 602 |
602 | 603 |
603 #undef __ | 604 #undef __ |
604 | 605 |
605 } } // namespace v8::internal | 606 } } // namespace v8::internal |
OLD | NEW |