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

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

Issue 201042: Win64 - Allow returning two values from a runtime function. (Closed)
Patch Set: Fixed typo. Created 11 years, 3 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
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 __ bind(&entry_label_); 605 __ bind(&entry_label_);
606 // Start new stack frame. 606 // Start new stack frame.
607 __ push(rbp); 607 __ push(rbp);
608 __ movq(rbp, rsp); 608 __ movq(rbp, rsp);
609 // Save parameters and callee-save registers. Order here should correspond 609 // Save parameters and callee-save registers. Order here should correspond
610 // to order of kBackup_ebx etc. 610 // to order of kBackup_ebx etc.
611 #ifdef _WIN64 611 #ifdef _WIN64
612 // MSVC passes arguments in rcx, rdx, r8, r9, with backing stack slots. 612 // MSVC passes arguments in rcx, rdx, r8, r9, with backing stack slots.
613 // Store register parameters in pre-allocated stack slots, 613 // Store register parameters in pre-allocated stack slots,
614 __ movq(Operand(rbp, kInputString), rcx); 614 __ movq(Operand(rbp, kInputString), rcx);
615 __ movzxlq(Operand(rbp, kStartIndex), rdx); // Passed as int in eax. 615 __ movq(Operand(rbp, kStartIndex), rdx); // Passed as int32 in edx.
616 __ movq(Operand(rbp, kInputStart), r8); 616 __ movq(Operand(rbp, kInputStart), r8);
617 __ movq(Operand(rbp, kInputEnd), r9); 617 __ movq(Operand(rbp, kInputEnd), r9);
618 // Callee-save on Win64. 618 // Callee-save on Win64.
619 __ push(rsi); 619 __ push(rsi);
620 __ push(rdi); 620 __ push(rdi);
621 __ push(rbx); 621 __ push(rbx);
622 #else 622 #else
623 // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9 (and then on stack). 623 // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9 (and then on stack).
624 // Push register parameters on stack for reference. 624 // Push register parameters on stack for reference.
625 ASSERT_EQ(kInputString, -1 * kPointerSize); 625 ASSERT_EQ(kInputString, -1 * kPointerSize);
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 1290
1291 void RegExpCEntryStub::Generate(MacroAssembler* masm_) { 1291 void RegExpCEntryStub::Generate(MacroAssembler* masm_) {
1292 __ int3(); // Unused on x64. 1292 __ int3(); // Unused on x64.
1293 } 1293 }
1294 1294
1295 #undef __ 1295 #undef __
1296 1296
1297 #endif // V8_NATIVE_REGEXP 1297 #endif // V8_NATIVE_REGEXP
1298 1298
1299 }} // namespace v8::internal 1299 }} // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698