aboutsummaryrefslogtreecommitdiff
path: root/executor/x86_64
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-18 06:37:58 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitd4d33a89586b5210d1f0bc81d95fa2b640da659b (patch)
tree1502737b7a9e34493665ce88b66c2e0d80d31118 /executor/x86_64
parent04b7ba96dbabea540f96ba7f72a220f067e9aaf8 (diff)
Cleanup on test failure
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)))