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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 13881016: Fix x64 frame size to accomodate saved XMM registers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/x64/frames-x64.h » ('j') | src/x64/frames-x64.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index ad77de6490b25173df37d4198066fa63fd6b462d..afc567cd9ad56d605c72e7f784e2e6feec3f6d60 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -4272,10 +4272,6 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
Label invoke, handler_entry, exit;
Label not_outermost_js, not_outermost_js_2;
-#ifdef _WIN64
- const int kCalleeSaveXMMRegisters = 10;
- const int kFullXMMRegisterSize = 16;
-#endif
{ // NOLINT. Scope block confuses linter.
MacroAssembler::NoRootArrayScope uninitialized_root_register(masm);
// Set up frame.
@@ -4305,17 +4301,17 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
#ifdef _WIN64
// On Win64 XMM6-XMM15 are callee-save
- __ subq(rsp, Immediate(kCalleeSaveXMMRegisters * kFullXMMRegisterSize));
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 0), xmm6);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 1), xmm7);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 2), xmm8);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 3), xmm9);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 4), xmm10);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 5), xmm11);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 6), xmm12);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 7), xmm13);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 8), xmm14);
- __ movdqu(Operand(rsp, kFullXMMRegisterSize * 9), xmm15);
+ __ subq(rsp, Immediate(EntryFrameConstants::kXMMRegistersBlockSize));
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 0), xmm6);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 1), xmm7);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 2), xmm8);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 3), xmm9);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 4), xmm10);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 5), xmm11);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 6), xmm12);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 7), xmm13);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 8), xmm14);
+ __ movdqu(Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 9), xmm15);
#endif
// Set up the roots and smi constant registers.
@@ -4408,17 +4404,17 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Restore callee-saved registers (X64 conventions).
#ifdef _WIN64
// On Win64 XMM6-XMM15 are callee-save
- __ movdqu(xmm6, Operand(rsp, kFullXMMRegisterSize * 0));
- __ movdqu(xmm7, Operand(rsp, kFullXMMRegisterSize * 1));
- __ movdqu(xmm8, Operand(rsp, kFullXMMRegisterSize * 2));
- __ movdqu(xmm8, Operand(rsp, kFullXMMRegisterSize * 3));
- __ movdqu(xmm10, Operand(rsp, kFullXMMRegisterSize * 4));
- __ movdqu(xmm11, Operand(rsp, kFullXMMRegisterSize * 5));
- __ movdqu(xmm12, Operand(rsp, kFullXMMRegisterSize * 6));
- __ movdqu(xmm13, Operand(rsp, kFullXMMRegisterSize * 7));
- __ movdqu(xmm14, Operand(rsp, kFullXMMRegisterSize * 8));
- __ movdqu(xmm15, Operand(rsp, kFullXMMRegisterSize * 9));
- __ addq(rsp, Immediate(kCalleeSaveXMMRegisters * kFullXMMRegisterSize));
+ __ movdqu(xmm6, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 0));
+ __ movdqu(xmm7, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 1));
+ __ movdqu(xmm8, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 2));
+ __ movdqu(xmm8, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 3));
Jakob Kummerow 2013/04/17 16:34:38 DBC: the "8" in this line looks *very* suspicious.
+ __ movdqu(xmm10, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 4));
+ __ movdqu(xmm11, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 5));
+ __ movdqu(xmm12, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 6));
+ __ movdqu(xmm13, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 7));
+ __ movdqu(xmm14, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 8));
+ __ movdqu(xmm15, Operand(rsp, EntryFrameConstants::kXMMRegisterSize * 9));
+ __ addq(rsp, Immediate(EntryFrameConstants::kXMMRegistersBlockSize));
#endif
__ pop(rbx);
« no previous file with comments | « no previous file | src/x64/frames-x64.h » ('j') | src/x64/frames-x64.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698