summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIgor Gatis <igorgatis@gmail.com>2015-11-19 13:53:37 -0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-11-19 20:23:43 +0200
commitf5c554dfe3da8564196a7bd65233171f40b7f8d4 (patch)
tree2dbf305ff805311459a0419d8b6f46418c5e31e7
parent593faf14c4700afd6c2ba6a281e7d48633e4d688 (diff)
downloadmicropython-f5c554dfe3da8564196a7bd65233171f40b7f8d4.tar.gz
micropython-f5c554dfe3da8564196a7bd65233171f40b7f8d4.zip
py: Added Cygwin support to py/nlrx86.S.
-rw-r--r--py/nlrx86.S16
1 files changed, 8 insertions, 8 deletions
diff --git a/py/nlrx86.S b/py/nlrx86.S
index 275dc82647..a2ddb174ad 100644
--- a/py/nlrx86.S
+++ b/py/nlrx86.S
@@ -35,7 +35,7 @@
// the offset of nlr_top within mp_state_ctx_t
#define NLR_TOP_OFFSET (2 * 4)
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
#define NLR_TOP (_mp_state_ctx + NLR_TOP_OFFSET)
#else
#define NLR_TOP (mp_state_ctx + NLR_TOP_OFFSET)
@@ -47,7 +47,7 @@
/**************************************/
// mp_uint_t nlr_push(4(%esp)=nlr_buf_t *nlr)
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
.globl _nlr_push
.def _nlr_push; .scl 2; .type 32; .endef
_nlr_push:
@@ -69,14 +69,14 @@ nlr_push:
mov %edx, NLR_TOP # stor new nlr_buf (to make linked list)
xor %eax, %eax # return 0, normal return
ret # return
-#ifndef _WIN32
+#if !(defined(_WIN32) || defined(__CYGWIN__))
.size nlr_push, .-nlr_push
#endif
/**************************************/
// void nlr_pop()
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
.globl _nlr_pop
.def _nlr_pop; .scl 2; .type 32; .endef
_nlr_pop:
@@ -89,14 +89,14 @@ nlr_pop:
mov (%eax), %eax # load prev nlr_buf
mov %eax, NLR_TOP # store nlr_top (to unlink list)
ret # return
-#ifndef _WIN32
+#if !(defined(_WIN32) || defined(__CYGWIN__))
.size nlr_pop, .-nlr_pop
#endif
/**************************************/
// void nlr_jump(4(%esp)=mp_uint_t val)
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
.globl _nlr_jump
.def _nlr_jump; .scl 2; .type 32; .endef
_nlr_jump:
@@ -107,7 +107,7 @@ nlr_jump:
#endif
mov NLR_TOP, %edx # load nlr_top
test %edx, %edx # check for nlr_top being NULL
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
je _nlr_jump_fail # fail if nlr_top is NULL
#else
je nlr_jump_fail # fail if nlr_top is NULL
@@ -126,7 +126,7 @@ nlr_jump:
xor %eax, %eax # clear return register
inc %al # increase to make 1, non-local return
ret # return
-#ifndef _WIN32
+#if !(defined(_WIN32) || defined(__CYGWIN__))
.size nlr_jump, .-nlr_jump
#endif