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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 6635041: Fix bug in X64 RegExpExec stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/regress/regress-1236.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 push(rbp); 2021 push(rbp);
2022 movq(rbp, rsp); 2022 movq(rbp, rsp);
2023 2023
2024 // Reserve room for entry stack pointer and push the code object. 2024 // Reserve room for entry stack pointer and push the code object.
2025 ASSERT(ExitFrameConstants::kSPOffset == -1 * kPointerSize); 2025 ASSERT(ExitFrameConstants::kSPOffset == -1 * kPointerSize);
2026 push(Immediate(0)); // Saved entry sp, patched before call. 2026 push(Immediate(0)); // Saved entry sp, patched before call.
2027 movq(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); 2027 movq(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT);
2028 push(kScratchRegister); // Accessed from EditFrame::code_slot. 2028 push(kScratchRegister); // Accessed from EditFrame::code_slot.
2029 2029
2030 // Save the frame pointer and the context in top. 2030 // Save the frame pointer and the context in top.
2031 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address);
2032 ExternalReference context_address(Top::k_context_address);
2033 if (save_rax) { 2031 if (save_rax) {
2034 movq(r14, rax); // Backup rax before we use it. 2032 movq(r14, rax); // Backup rax in callee-save register.
2035 } 2033 }
2036 2034
2037 movq(rax, rbp); 2035 movq(kScratchRegister, ExternalReference(Top::k_c_entry_fp_address));
2038 store_rax(c_entry_fp_address); 2036 movq(Operand(kScratchRegister, 0), rbp);
2039 movq(rax, rsi); 2037
2040 store_rax(context_address); 2038 movq(kScratchRegister, ExternalReference(Top::k_context_address));
2039 movq(Operand(kScratchRegister, 0), rsi);
2041 } 2040 }
2042 2041
2043 2042
2044 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, 2043 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space,
2045 bool save_doubles) { 2044 bool save_doubles) {
2046 #ifdef _WIN64 2045 #ifdef _WIN64
2047 const int kShadowSpace = 4; 2046 const int kShadowSpace = 4;
2048 arg_stack_space += kShadowSpace; 2047 arg_stack_space += kShadowSpace;
2049 #endif 2048 #endif
2050 // Optionally save all XMM registers. 2049 // Optionally save all XMM registers.
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2687 CPU::FlushICache(address_, size_); 2686 CPU::FlushICache(address_, size_);
2688 2687
2689 // Check that the code was patched as expected. 2688 // Check that the code was patched as expected.
2690 ASSERT(masm_.pc_ == address_ + size_); 2689 ASSERT(masm_.pc_ == address_ + size_);
2691 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2690 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2692 } 2691 }
2693 2692
2694 } } // namespace v8::internal 2693 } } // namespace v8::internal
2695 2694
2696 #endif // V8_TARGET_ARCH_X64 2695 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/regress/regress-1236.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698