diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-27 18:01:43 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-03-01 10:05:33 +0200 |
commit | 82a165d9be60be33af5092543e60a3fff82ef07e (patch) | |
tree | f7320a88a7b1ae09cc323bfbce90bff83a13a595 | |
parent | 793838a919c9cb848cb8c3f2d88d8b347bfd6083 (diff) | |
download | micropython-82a165d9be60be33af5092543e60a3fff82ef07e.tar.gz micropython-82a165d9be60be33af5092543e60a3fff82ef07e.zip |
nlr.h: Do proper arch selection, using the same tests as nlr*.S .
-rw-r--r-- | py/nlr.h | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -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 }; |