py/nlrx86: Better check for Zephyr (requires 1.7).

pull/2980/head
Paul Sokolovsky 2017-03-26 00:32:51 +03:00
rodzic fa17eabce9
commit 99866a00a0
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -49,10 +49,9 @@ unsigned int nlr_push(nlr_buf_t *nlr) {
__asm volatile (
// Check for Zephyr, which uses a different calling convention
// by default.
// TODO: Better check for Zephyr.
// TODE: Better support for various x86 calling conventions
// (unfortunately, __attribute__((naked)) is not supported on x86).
#ifndef CONFIG_SOC_IA32
#ifndef __ZEPHYR__
"pop %ebp \n" // undo function's prelude
#endif
"mov 4(%esp), %edx \n" // load nlr_buf

Wyświetl plik

@ -27,6 +27,8 @@
// Include Zephyr's autoconf.h, which should be made first by Zephyr makefiles
#include "autoconf.h"
// Included here to get basic Zephyr environment (macros, etc.)
#include <zephyr.h>
// Usually passed from Makefile
#ifndef MICROPY_HEAP_SIZE