summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-29 22:24:35 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-29 22:24:35 +0000
commit14b929f1d90af2604c51670eed840b894d2d9b87 (patch)
tree609477a446532ee38b6ca750e1a1e562575e8a0b /py
parent62ad189a65e5e3b4cb6c64c9ea2d493f2c06fffd (diff)
parent242856cfbf2a70838bf0daf267eb7af7bf78bb3b (diff)
downloadmicropython-14b929f1d90af2604c51670eed840b894d2d9b87.tar.gz
micropython-14b929f1d90af2604c51670eed840b894d2d9b87.zip
Merge branch 'master' of github.com:msiemens/micropython into msiemens-master
Diffstat (limited to 'py')
-rw-r--r--py/asmx64.c1
-rw-r--r--py/nlrx86.S29
2 files changed, 29 insertions, 1 deletions
diff --git a/py/asmx64.c b/py/asmx64.c
index d3158170fb..de34332481 100644
--- a/py/asmx64.c
+++ b/py/asmx64.c
@@ -1,3 +1,4 @@
+#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
diff --git a/py/nlrx86.S b/py/nlrx86.S
index 3e2eec7a7b..5cfd4a8cfc 100644
--- a/py/nlrx86.S
+++ b/py/nlrx86.S
@@ -5,9 +5,15 @@
.text
/* uint nlr_push(4(%esp)=nlr_buf_t *nlr) */
+#ifdef _WIN32
+ .globl _nlr_push
+ .def _nlr_push; .scl 2; .type 32; .endef
+_nlr_push:
+#else
.globl nlr_push
.type nlr_push, @function
nlr_push:
+#endif
mov 4(%esp), %edx # load nlr_buf
mov (%esp), %eax # load return %ip
mov %eax, 8(%edx) # store %ip into nlr_buf+8
@@ -21,22 +27,38 @@ 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
.size nlr_push, .-nlr_push
+#endif
/* void nlr_pop() */
+#ifdef _WIN32
+ .globl _nlr_pop
+ .def _nlr_pop; .scl 2; .type 32; .endef
+_nlr_pop:
+#else
.globl nlr_pop
.type nlr_pop, @function
nlr_pop:
+#endif
mov nlr_top, %eax # load nlr_top
mov (%eax), %eax # load prev nlr_buf
mov %eax, nlr_top # store nlr_top (to unlink list)
ret # return
+#ifndef _WIN32
.size nlr_pop, .-nlr_pop
+#endif
/* void nlr_jump(4(%esp)=uint val) */
+#ifdef _WIN32
+ .globl _nlr_jump
+ .def _nlr_jump; .scl 2; .type 32; .endef
+_nlr_jump:
+#else
.globl nlr_jump
.type nlr_jump, @function
nlr_jump:
+#endif
mov nlr_top, %edx # load nlr_top
mov 4(%esp), %eax # load return value
mov %eax, 4(%edx) # store return value
@@ -52,8 +74,13 @@ nlr_jump:
xor %eax, %eax # clear return register
inc %al # increase to make 1, non-local return
ret # return
+#ifndef _WIN32
.size nlr_jump, .-nlr_jump
+#endif
+#ifndef _WIN32
.local nlr_top
- .comm nlr_top,4,4
#endif
+ .comm nlr_top,4,4
+
+#endif /* __i386__ */