summaryrefslogtreecommitdiffstatshomepage
path: root/py/asmx86.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/asmx86.h')
-rw-r--r--py/asmx86.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/py/asmx86.h b/py/asmx86.h
index 5af19cbf61..6099325c7e 100644
--- a/py/asmx86.h
+++ b/py/asmx86.h
@@ -44,6 +44,14 @@
#define REG_ESI (6)
#define REG_EDI (7)
+// x86 passes values on the stack, but the emitter is register based, so we need
+// to define registers that can temporarily hold the function arguments. They
+// need to be defined here so that asm_x86_call_ind can push them onto the stack
+// before the call.
+#define ASM_X86_REG_ARG_1 REG_EAX
+#define ASM_X86_REG_ARG_2 REG_ECX
+#define ASM_X86_REG_ARG_3 REG_EDX
+
// condition codes, used for jcc and setcc (despite their j-name!)
#define ASM_X86_CC_JB (0x2) // below, unsigned
#define ASM_X86_CC_JZ (0x4)