py/emitndebug: Add native debug emitter.

This emitter prints out pseudo-machine instructions, instead of the usual
output of the native emitter.  It can be enabled on any port via
`MICROPY_EMIT_NATIVE_DEBUG` (make sure other native emitters are disabled)
but the easiest way to use it is with mpy-cross:

    $ mpy-cross -march=debug file.py

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-03-07 11:38:27 +11:00
parent e2ae03e979
commit 9dbc787ce8
11 changed files with 315 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ set(MICROPY_SOURCE_PY
${MICROPY_PY_DIR}/emitinlinethumb.c
${MICROPY_PY_DIR}/emitinlinextensa.c
${MICROPY_PY_DIR}/emitnarm.c
${MICROPY_PY_DIR}/emitndebug.c
${MICROPY_PY_DIR}/emitnrv32.c
${MICROPY_PY_DIR}/emitnthumb.c
${MICROPY_PY_DIR}/emitnx64.c