aboutsummaryrefslogtreecommitdiff
path: root/py/nlrx86.S
diff options
context:
space:
mode:
authorDamien George2015-01-01 23:30:53 +0000
committerDamien George2015-01-07 20:33:00 +0000
commitb4b10fd350852e321624d74983cca286091b55a1 (patch)
tree7ac4aa40d70be0170a61f649e9d73c42faa4ba33 /py/nlrx86.S
parentad2307c92c15f0aa90dbd0741fd2538719d0b5e1 (diff)
py: Put all global state together in state structures.
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
Diffstat (limited to 'py/nlrx86.S')
-rw-r--r--py/nlrx86.S7
1 files changed, 5 insertions, 2 deletions
diff --git a/py/nlrx86.S b/py/nlrx86.S
index 34d0bfc4e..275dc8264 100644
--- a/py/nlrx86.S
+++ b/py/nlrx86.S
@@ -32,10 +32,13 @@
// For reference, x86 callee save regs are:
// ebx, esi, edi, ebp, esp, eip
+// the offset of nlr_top within mp_state_ctx_t
+#define NLR_TOP_OFFSET (2 * 4)
+
#ifdef _WIN32
-#define NLR_TOP _nlr_top
+#define NLR_TOP (_mp_state_ctx + NLR_TOP_OFFSET)
#else
-#define NLR_TOP nlr_top
+#define NLR_TOP (mp_state_ctx + NLR_TOP_OFFSET)
#endif
.file "nlr.s"