aboutsummaryrefslogtreecommitdiff
path: root/executor/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'executor/x86_64')
-rw-r--r--executor/x86_64/executor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/executor/x86_64/executor.c b/executor/x86_64/executor.c
index ebe848d..fbe227a 100644
--- a/executor/x86_64/executor.c
+++ b/executor/x86_64/executor.c
@@ -35,6 +35,7 @@ typedef struct {
The first parameter is located at 3*sizeof(usize) and the next one is at 4*sizeof(usize).
Parameter starts at 3*sizeof(usize) because offset 0 is the return address, offset 1*sizeof(usize) is the
saved RBP and 2*sizeof(usize) is saved RBX.
+ TODO: Use different offset when saving more registers, for example on Microsoft Windows.
*/
#define get_register_stack_offset(reg) \
(reg >= 0 ? (i32)(-reg * (int)sizeof(usize) - sizeof(usize)) : (i32)(-reg * (int)sizeof(usize) + 2*sizeof(usize)))