summaryrefslogtreecommitdiff
path: root/mpy-cross/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-09-13 13:16:00 +1000
committerDamien George <damien.p.george@gmail.com>2019-10-05 13:45:32 +1000
commit1d21b4e7d17fe22dc046a1bfd3251d25c013bd05 (patch)
tree6a635dc6a467880daec2bc9f92d13b110d79653c /mpy-cross/main.c
parent917f027c0b4bbb8170fdf529b4d4c1b2e1e5a931 (diff)
mpy-cross: Enable Xtensa-Windowed native emitter.
Selectable via the command line: -march=xtensawin.
Diffstat (limited to 'mpy-cross/main.c')
-rw-r--r--mpy-cross/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mpy-cross/main.c b/mpy-cross/main.c
index be43598c5..4a4fccb3b 100644
--- a/mpy-cross/main.c
+++ b/mpy-cross/main.c
@@ -109,7 +109,7 @@ STATIC int usage(char **argv) {
"-msmall-int-bits=number : set the maximum bits used to encode a small-int\n"
"-mno-unicode : don't support unicode in compiled strings\n"
"-mcache-lookup-bc : cache map lookups in the bytecode\n"
-"-march=<arch> : set architecture for native emitter; x86, x64, armv6, armv7m, xtensa\n"
+"-march=<arch> : set architecture for native emitter; x86, x64, armv6, armv7m, xtensa, xtensawin\n"
"\n"
"Implementation specific options:\n", argv[0]
);
@@ -288,6 +288,9 @@ MP_NOINLINE int main_(int argc, char **argv) {
} else if (strcmp(arch, "xtensa") == 0) {
mp_dynamic_compiler.native_arch = MP_NATIVE_ARCH_XTENSA;
mp_dynamic_compiler.nlr_buf_num_regs = MICROPY_NLR_NUM_REGS_XTENSA;
+ } else if (strcmp(arch, "xtensawin") == 0) {
+ mp_dynamic_compiler.native_arch = MP_NATIVE_ARCH_XTENSAWIN;
+ mp_dynamic_compiler.nlr_buf_num_regs = MICROPY_NLR_NUM_REGS_XTENSAWIN;
} else {
return usage(argv);
}