mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py/nlrmips: Add native NLR support for MIPS architecture.
This can be tested using ports/minimal and qemu:
make CC=mips-linux-gnu-gcc-8
Then run with qemu-mips:
stty raw opost -echo;
QEMU_LD_PREFIX=/usr/mips-linux-gnu/ qemu-mips build/firmware.elf;
sleep 1; reset
Signed-off-by: Jan Willeke <willeke@smartmote.de>
This commit is contained in:
committed by
Damien George
parent
043dc4dd0c
commit
40a3aa709c
4
py/nlr.h
4
py/nlr.h
@@ -40,6 +40,7 @@
|
||||
#define MICROPY_NLR_NUM_REGS_ARM_THUMB (10)
|
||||
#define MICROPY_NLR_NUM_REGS_ARM_THUMB_FP (10 + 6)
|
||||
#define MICROPY_NLR_NUM_REGS_AARCH64 (13)
|
||||
#define MICROPY_NLR_NUM_REGS_MIPS (13)
|
||||
#define MICROPY_NLR_NUM_REGS_XTENSA (10)
|
||||
#define MICROPY_NLR_NUM_REGS_XTENSAWIN (17)
|
||||
|
||||
@@ -83,6 +84,9 @@
|
||||
#define MICROPY_NLR_POWERPC (1)
|
||||
// this could be less but using 128 for safety
|
||||
#define MICROPY_NLR_NUM_REGS (128)
|
||||
#elif defined(__mips__)
|
||||
#define MICROPY_NLR_MIPS (1)
|
||||
#define MICROPY_NLR_NUM_REGS (MICROPY_NLR_NUM_REGS_MIPS)
|
||||
#else
|
||||
#define MICROPY_NLR_SETJMP (1)
|
||||
//#warning "No native NLR support for this arch, using setjmp implementation"
|
||||
|
||||
Reference in New Issue
Block a user