summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/nlr.h14
-rw-r--r--py/nlrthumb.S2
2 files changed, 6 insertions, 10 deletions
diff --git a/py/nlr.h b/py/nlr.h
index 8ca8a9dc62..4cc66d8c20 100644
--- a/py/nlr.h
+++ b/py/nlr.h
@@ -3,23 +3,19 @@
#include <limits.h>
-//#ifndef __WORDSIZE
-//#error __WORDSIZE needs to be defined
-//#endif
-
typedef struct _nlr_buf_t nlr_buf_t;
struct _nlr_buf_t {
// the entries here must all be machine word size
nlr_buf_t *prev;
void *ret_val;
-#if __WORDSIZE == 32
+#if defined(__i386__)
void *regs[6];
-#elif __WORDSIZE == 64
+#elif defined(__x86_64__)
void *regs[8];
-#else
- // hack for thumb
+#elif defined(__thumb2__)
void *regs[10];
-//#error Unsupported __WORDSIZE
+#else
+#error Unknown arch in nlr.h
#endif
};
diff --git a/py/nlrthumb.S b/py/nlrthumb.S
index 22e0b6ba4d..8c6eb95522 100644
--- a/py/nlrthumb.S
+++ b/py/nlrthumb.S
@@ -2,7 +2,7 @@
/* thumb callee save: bx, bp, sp, r12, r14, r14, r15 */
.syntax unified
- .cpu cortex-m4
+ /*.cpu cortex-m4*/
.thumb
.text
.align 2