micropython/py
stijn b184b6ae53 py/nlr: Fix nlr functions for 64bit ports built with gcc on Windows
The number of registers used should be 10, not 12, to match the assembly
code in nlrx64.c. With this change the 64bit mingw builds don't need to
use the setjmp implementation, and this fixes miscellaneous crashes and
assertion failures as reported in #1751 for instance.

To avoid mistakes in the future where something gcc-related for Windows
only gets fixed for one particular compiler/environment combination,
make use of a MICROPY_NLR_OS_WINDOWS macro.

To make sure everything nlr-related is now ok when built with gcc this
has been verified with:
- unix port built with gcc on Cygwin (i686-pc-cygwin-gcc and
  x86_64-pc-cygwin-gcc, version 6.4.0)
- windows port built with mingw-w64's gcc from Cygwin
 (i686-w64-mingw32-gcc and x86_64-w64-mingw32-gcc, version 6.4.0)
 and MSYS2 (like the ones on Cygwin but version 7.2.0)
2017-12-29 22:24:46 +11:00
..
argcheck.c py/argcheck: Remove #if guard around terse error message helper func. 2017-10-19 18:57:26 +11:00
asmarm.c
asmarm.h py/emitnative: Clean up asm macro names so they have dest as first arg. 2017-11-15 11:46:49 +11:00
asmbase.c py/asmbase: Revert removal of clearing of label offsets for native emit. 2017-12-08 19:07:00 +11:00
asmbase.h
asmthumb.c py/asmthumb: Use existing macro to properly clear the D-cache. 2017-08-23 11:32:27 +10:00
asmthumb.h py/emitnative: Clean up asm macro names so they have dest as first arg. 2017-11-15 11:46:49 +11:00
asmx64.c
asmx64.h py/emitnative: Clean up asm macro names so they have dest as first arg. 2017-11-15 11:46:49 +11:00
asmx86.c
asmx86.h py/emitnative: Clean up asm macro names so they have dest as first arg. 2017-11-15 11:46:49 +11:00
asmxtensa.c
asmxtensa.h py/emitnative: Clean up asm macro names so they have dest as first arg. 2017-11-15 11:46:49 +11:00
bc.c py/bc: Update opcode_format_table to match the bytecode. 2017-10-10 10:37:38 +11:00
bc.h all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
bc0.h py: Clean up unary and binary enum list to keep groups together. 2017-10-05 10:49:44 +11:00
binary.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
binary.h
builtin.h py/builtinhelp: Change signature of help text var from pointer to array. 2017-09-12 16:03:52 +10:00
builtinevex.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
builtinhelp.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
builtinimport.c py/builtinimport: Call __init__ for modules imported via a weak link. 2017-12-13 14:48:53 +11:00
compile.c py: Convert all uses of alloca() to use new scoped allocation API. 2017-12-11 13:49:09 +11:00
compile.h
emit.h all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
emitbc.c py/{emitbc,asmbase}: Only clear emit labels to -1 when in debug mode. 2017-12-08 18:23:23 +11:00
emitcommon.c
emitglue.c
emitglue.h py/emitglue: Change type of bit-field to explicitly unsigned mp_uint_t. 2017-12-15 10:21:10 +11:00
emitinlinethumb.c
emitinlinextensa.c
emitnative.c py/emitnative: Clean up asm macro names so they have dest as first arg. 2017-11-15 11:46:49 +11:00
formatfloat.c py/formatfloat: Use standard isinf, isnan funcs instead of custom ones. 2017-10-10 16:27:54 +11:00
formatfloat.h
frozenmod.c
frozenmod.h
gc.c py: Introduce a Python stack for scoped allocation. 2017-12-11 13:49:09 +11:00
gc.h
grammar.h
lexer.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
lexer.h
makeqstrdata.py py/objtype: Fit qstrs for special methods in byte type. 2017-10-21 11:06:32 +03:00
makeqstrdefs.py
makeversionhdr.py
malloc.c py/malloc: Remove unneeded code checking m_malloc return value. 2017-12-20 16:55:42 +11:00
map.c py/map: Don't include ordered-dict mutating code when not needed. 2017-12-19 13:37:15 +11:00
misc.h py/misc.h: Add m_new_obj_var_with_finaliser(). 2017-12-04 11:05:49 +02:00
mkenv.mk py/mkenv.mk: Use $(PYTHON) consistently when calling Python tools. 2017-11-15 11:56:58 +11:00
mkrules.mk py/mkrules.mk: Add "clean-frozen" target to clean frozen script/modules dir. 2017-12-10 01:05:29 +02:00
modarray.c
modbuiltins.c py/modbuiltins: Use standard arg-parsing helper func for builtin print. 2017-12-05 12:14:57 +11:00
modcmath.c py: Change obsolete "///" comment formatting to normal comments. 2017-08-30 21:02:00 +10:00
modcollections.c
modgc.c py: Change obsolete "///" comment formatting to normal comments. 2017-08-30 21:02:00 +10:00
modio.c py/modio: Use correct config macro to enable resource_stream function. 2017-12-19 16:59:08 +11:00
modmath.c py/modmath: Convert log2 macro into a function. 2017-10-10 16:01:04 +11:00
modmicropython.c py: Introduce a Python stack for scoped allocation. 2017-12-11 13:49:09 +11:00
modstruct.c py/modstruct: Check and prevent buffer-write overflow in struct packing. 2017-09-01 11:11:09 +10:00
modsys.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modthread.c py: Introduce a Python stack for scoped allocation. 2017-12-11 13:49:09 +11:00
moduerrno.c
mpconfig.h py/objgenerator: Allow to pend an exception for next execution. 2017-12-15 20:20:36 +02:00
mperrno.h
mphal.h
mpprint.c py/mpprint: Fix "%x" vs "%X" regression introduced in previous commit. 2017-12-07 10:31:14 +02:00
mpprint.h
mpstate.c
mpstate.h py/mpstate.h: Remove obsolete comment about nlr_top being coded in asm. 2017-12-11 22:51:52 +11:00
mpthread.h
mpz.c py/mpz: In mpz_as_str_inpl, convert always-false checks to assertions. 2017-12-29 14:17:55 +11:00
mpz.h py/mpz: Simplify handling of borrow and quo adjustment in mpn_div. 2017-12-29 14:05:48 +11:00
nativeglue.c py/emitnative: Implement floor-division and modulo for viper emitter. 2017-10-11 18:54:34 +11:00
nlr.c py/nlr: Fix nlr functions for 64bit ports built with gcc on Windows 2017-12-29 22:24:46 +11:00
nlr.h py/nlr: Fix nlr functions for 64bit ports built with gcc on Windows 2017-12-29 22:24:46 +11:00
nlrsetjmp.c py/nlr: Factor out common NLR code to macro and generic funcs in nlr.c. 2017-12-28 16:46:30 +11:00
nlrthumb.c py/nlr: Factor out common NLR code to macro and generic funcs in nlr.c. 2017-12-28 16:46:30 +11:00
nlrx64.c py/nlr: Fix nlr functions for 64bit ports built with gcc on Windows 2017-12-29 22:24:46 +11:00
nlrx86.c py/nlr: Fix nlr functions for 64bit ports built with gcc on Windows 2017-12-29 22:24:46 +11:00
nlrxtensa.c py/nlr: Factor out common NLR code to macro and generic funcs in nlr.c. 2017-12-28 16:46:30 +11:00
obj.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
obj.h py: Extend nan-boxing config to have 47-bit small integers. 2017-12-11 22:39:12 +11:00
objarray.c py/runtime: Add MP_BINARY_OP_CONTAINS as reverse of MP_BINARY_OP_IN. 2017-11-24 14:48:23 +11:00
objarray.h
objattrtuple.c
objbool.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objboundmeth.c py: Convert all uses of alloca() to use new scoped allocation API. 2017-12-11 13:49:09 +11:00
objcell.c
objclosure.c
objcomplex.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objdict.c py/objdict: Reuse dict-view key iterator for standard dict iterator. 2017-11-27 23:40:31 +11:00
objenumerate.c
objexcept.c py/objtype: Implement better support for overriding native's __init__. 2017-12-12 16:43:16 +11:00
objexcept.h
objfilter.c
objfloat.c py/objfloat: Allow float() to parse anything with the buffer protocol. 2017-11-21 15:01:38 +11:00
objfun.c py: Convert all uses of alloca() to use new scoped allocation API. 2017-12-11 13:49:09 +11:00
objfun.h
objgenerator.c py/objgenerator: Allow to pend an exception for next execution. 2017-12-15 20:20:36 +02:00
objgenerator.h
objgetitemiter.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objint.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objint.h py/modbuiltins: Implement abs() by dispatching to MP_UNARY_OP_ABS. 2017-09-18 00:06:43 +03:00
objint_longlong.c py/objint_longlong: Check for zero division/modulo. 2017-12-08 20:40:55 +02:00
objint_mpz.c py/runtime: Add MP_BINARY_OP_CONTAINS as reverse of MP_BINARY_OP_IN. 2017-11-24 14:48:23 +11:00
objlist.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
objlist.h
objmap.c
objmodule.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objmodule.h
objnamedtuple.c py/objnamedtuple: Allow to reuse namedtuple basic functionality. 2017-11-20 09:30:06 +02:00
objnamedtuple.h py/objnamedtuple: Allow to reuse namedtuple basic functionality. 2017-11-20 09:30:06 +02:00
objnone.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objobject.c py/objtype: Refactor object's handling of __new__ to not create 2 objs. 2017-12-12 16:53:44 +11:00
objpolyiter.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objproperty.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objrange.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objreversed.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objset.c py/objset: Remove unneeded check from set_equal. 2017-12-19 14:01:19 +11:00
objsingleton.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objslice.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objstr.c py: Annotate func defs with NORETURN when their corresp decls have it. 2017-11-29 15:43:40 +11:00
objstr.h py/objstr: Make mp_obj_new_str_of_type check for existing interned qstr. 2017-11-16 13:53:04 +11:00
objstringio.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objstringio.h
objstrunicode.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
objtuple.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
objtuple.h all: Convert mp_uint_t to mp_unary_op_t/mp_binary_op_t where appropriate 2017-08-29 13:16:30 +10:00
objtype.c py/objtype: Refactor object's handling of __new__ to not create 2 objs. 2017-12-12 16:53:44 +11:00
objtype.h py/objtype: Refactor object's handling of __new__ to not create 2 objs. 2017-12-12 16:53:44 +11:00
objzip.c
opmethods.c py/runtime: Add MP_BINARY_OP_CONTAINS as reverse of MP_BINARY_OP_IN. 2017-11-24 14:48:23 +11:00
parse.c py/parse: Fix macro evaluation by avoiding empty __VA_ARGS__. 2017-12-29 13:44:26 +11:00
parse.h
parsenum.c py/parsenum: Improve parsing of floating point numbers. 2017-11-27 12:51:52 +11:00
parsenum.h
parsenumbase.c
parsenumbase.h
persistentcode.c py/persistentcode: Bump .mpy version number to version 3. 2017-10-05 10:49:44 +11:00
persistentcode.h
py.mk py/nlr: Factor out common NLR code to macro and generic funcs in nlr.c. 2017-12-28 16:46:30 +11:00
pystack.c py: Introduce a Python stack for scoped allocation. 2017-12-11 13:49:09 +11:00
pystack.h py: Introduce a Python stack for scoped allocation. 2017-12-11 13:49:09 +11:00
qstr.c py/qstr: Rewrite find_qstr to make manifest that it returns a valid ptr. 2017-11-29 17:01:39 +11:00
qstr.h py/compile: Use alloca instead of qstr_build when compiling import name. 2017-11-01 13:16:16 +11:00
qstrdefs.h py/modbuiltins: Use standard arg-parsing helper func for builtin print. 2017-12-05 12:14:57 +11:00
reader.c
reader.h
repl.c
repl.h
ringbuf.h
runtime.c py/runtime: Remove unnecessary break statements from switch. 2017-12-19 13:13:21 +11:00
runtime.h py: Introduce a Python stack for scoped allocation. 2017-12-11 13:49:09 +11:00
runtime0.h py/runtime: Add MP_BINARY_OP_CONTAINS as reverse of MP_BINARY_OP_IN. 2017-11-24 14:48:23 +11:00
runtime_utils.c py: mp_call_function_*_protected(): Pass-thru return value if possible. 2017-12-05 00:38:41 +02:00
scheduler.c
scope.c
scope.h
sequence.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
showbc.c py: Clean up unary and binary enum list to keep groups together. 2017-10-05 10:49:44 +11:00
smallint.c
smallint.h py: Extend nan-boxing config to have 47-bit small integers. 2017-12-11 22:39:12 +11:00
stackctrl.c py/runtime: Move mp_exc_recursion_depth to runtime and rename to raise. 2017-12-11 13:49:09 +11:00
stackctrl.h
stream.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
stream.h
unicode.c py/objstr: Add check for valid UTF-8 when making a str from bytes. 2017-09-06 16:43:09 +10:00
unicode.h py/objstr: Add check for valid UTF-8 when making a str from bytes. 2017-09-06 16:43:09 +10:00
vm.c py/runtime: Use the Python stack when building *arg and **kwarg state. 2017-12-11 13:49:09 +11:00
vmentrytable.h py: Clean up unary and binary enum list to keep groups together. 2017-10-05 10:49:44 +11:00
vstr.c py/vstr: Raise a RuntimeError if fixed vstr buffer overflows. 2017-09-21 20:29:41 +10:00
warning.c py: Add config option to print warnings/errors to stderr. 2017-09-26 11:59:11 +10:00