summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorMarkus Siemens <siemens1993@gmail.com>2014-01-27 22:53:28 +0100
committerMarkus Siemens <siemens1993@gmail.com>2014-01-28 18:21:05 +0100
commit19ccc6bdc7c761cc94e740c775f13506992ca0d6 (patch)
tree1c44e4b08c1c6b3f9903d6d0f92fb290fc19e0d1 /py
parent9b00dad7bb0125a3459ca4f9c939c7510bd2f77f (diff)
downloadmicropython-19ccc6bdc7c761cc94e740c775f13506992ca0d6.tar.gz
micropython-19ccc6bdc7c761cc94e740c775f13506992ca0d6.zip
Added Windows port (see #233)
Diffstat (limited to 'py')
-rw-r--r--py/asmx64.c1
-rw-r--r--py/nlrx86.S23
2 files changed, 24 insertions, 0 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..9bcefeba57 100644
--- a/py/nlrx86.S
+++ b/py/nlrx86.S
@@ -5,9 +5,14 @@
.text
/* uint nlr_push(4(%esp)=nlr_buf_t *nlr) */
+#ifdef __apple_build_version__
.globl nlr_push
.type nlr_push, @function
nlr_push:
+#else
+ .globl _nlr_push
+_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 +26,36 @@ nlr_push:
mov %edx, nlr_top # stor new nlr_buf (to make linked list)
xor %eax, %eax # return 0, normal return
ret # return
+#ifdef __apple_build_version__
.size nlr_push, .-nlr_push
+#endif
/* void nlr_pop() */
+#ifdef __apple_build_version__
.globl nlr_pop
.type nlr_pop, @function
nlr_pop:
+#else
+ .globl _nlr_pop
+_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
+#ifdef __apple_build_version__
.size nlr_pop, .-nlr_pop
+#endif
/* void nlr_jump(4(%esp)=uint val) */
+#ifdef __apple_build_version__
.globl nlr_jump
.type nlr_jump, @function
nlr_jump:
+#else
+ .globl _nlr_jump
+ _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 +71,12 @@ nlr_jump:
xor %eax, %eax # clear return register
inc %al # increase to make 1, non-local return
ret # return
+#ifdef __apple_build_version__
.size nlr_jump, .-nlr_jump
+#endif
+#ifdef __apple_build_version__
.local nlr_top
+#endif
.comm nlr_top,4,4
#endif