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

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 e611c8ae27999a9520d0aa07bfa050b51a0bb831..2eb12a5f9538ba5b3d138cb589c5093bb875d933 100644
--- a/src/x64/macro-assembler-x64.h
+++ b/src/x64/macro-assembler-x64.h
@@ -1523,6 +1523,31 @@ inline Operand StackOperandForReturnAddress(int32_t disp) {
}
+// Computes the argument address in reverse order, i.e., from the last argument
+// at rsp + kPCOnStackSize.
+inline Operand StackOperandForReversedArgument(int index) {
+ return Operand(rsp, kPCOnStackSize + index * kPointerSize);
+}
+
+
+// Computes the argument address in reverse order, i.e., from the last argument
+// at rsp + kPCOnStackSize.
+inline Operand StackOperandForReversedArgument(Register index, int offset) {
+ return Operand(rsp, index, times_pointer_size,
+ kPCOnStackSize + offset * kPointerSize);
+}
+
+
+inline Operand StackOperandForReceiver(int index) {
+ return StackOperandForReversedArgument(index);
+}
+
+
+inline Operand StackOperandForReceiver(Register index) {
+ return StackOperandForReversedArgument(index, 0);
+}
+
+
#ifdef GENERATED_CODE_COVERAGE
extern void LogGeneratedCodeCoverage(const char* file_line);
#define CODE_COVERAGE_STRINGIFY(x) #x

Powered by Google App Engine
This is Rietveld 408576698