Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: src/x64/codegen-x64.cc

Issue 123017: X64: Create test JS-function and call it. (Closed)
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698