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

Unified Diff: src/x64/macro-assembler-x64.h

Issue 21123008: Introduce StackArgumentsAccessor class for X64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
Index: src/x64/macro-assembler-x64.h
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h
index 9d5d2a31c5ceee61652cd923ca83e8a13d1388ca..2ce78e5c182f269f1e2a9f539c9e9fb0e280c531 100644
--- a/src/x64/macro-assembler-x64.h
+++ b/src/x64/macro-assembler-x64.h
@@ -1518,6 +1518,23 @@ inline Operand StackSpaceOperand(int index) {
}
+// Assumes the return address size equals an argument size.
+// Considers receiver as argument 0.
+inline Operand StackOperandForArgument(int32_t disp) {
+ // Adjusts the disp with kPCOnStackSize - kPointerSize.
+ return Operand(rsp, disp + kPCOnStackSize - kPointerSize);
danno 2013/07/31 07:48:37 Does it make sense to use an index rather than dis
haitao.feng 2013/07/31 09:25:20 I have thought about this. I did not use it as ind
+}
+
+
+// Assumes the return address size equals an argument size.
+// Considers receiver as argument 0.
+inline Operand StackOperandForArgument(Register index,
+ ScaleFactor scale,
+ int32_t disp) {
danno 2013/07/31 07:48:37 Same here (index rather than displacement)?
+ // Adjusts the disp with kPCOnStackSize - kPointerSize.
+ return Operand(rsp, index, scale, disp + kPCOnStackSize - kPointerSize);
+}
+
#ifdef GENERATED_CODE_COVERAGE
extern void LogGeneratedCodeCoverage(const char* file_line);

Powered by Google App Engine
This is Rietveld 408576698