summaryrefslogtreecommitdiff
path: root/py/asmxtensa.h
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2025-06-26 21:56:26 +0200
committerDamien George <damien@micropython.org>2025-07-04 16:07:04 +1000
commit2ab06b61b3f60e42cda250203bda31667ecef043 (patch)
treed7e55a12b6c38bf69beef98922f359339c825edb /py/asmxtensa.h
parent3a97175f5f7023d9f8db37c21e0c04174df0f205 (diff)
py/emitnative: Let emitters know the compiled entity's name.
This commit introduces an optional feature to provide to native emitters the fully qualified name of the entity they are compiling. This is achieved by altering the generic ASM API to provide a third argument to the entry function, containing the name of the entity being compiled. Currently only the debug emitter uses this feature, as it is not really useful for other emitters for the time being; in fact the macros in question just strip the name away. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'py/asmxtensa.h')
-rw-r--r--py/asmxtensa.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/py/asmxtensa.h b/py/asmxtensa.h
index 7f113ca12..559b3cacd 100644
--- a/py/asmxtensa.h
+++ b/py/asmxtensa.h
@@ -340,9 +340,9 @@ void asm_xtensa_l32r(asm_xtensa_t *as, mp_uint_t reg, mp_uint_t label);
#define ASM_NUM_REGS_SAVED ASM_XTENSA_NUM_REGS_SAVED
#define REG_FUN_TABLE ASM_XTENSA_REG_FUN_TABLE
-#define ASM_ENTRY(as, nlocal) asm_xtensa_entry((as), (nlocal))
-#define ASM_EXIT(as) asm_xtensa_exit((as))
-#define ASM_CALL_IND(as, idx) asm_xtensa_call_ind((as), (idx))
+#define ASM_ENTRY(as, nlocal, name) asm_xtensa_entry((as), (nlocal))
+#define ASM_EXIT(as) asm_xtensa_exit((as))
+#define ASM_CALL_IND(as, idx) asm_xtensa_call_ind((as), (idx))
#else
// Configuration for windowed calls with window size 8
@@ -370,9 +370,9 @@ void asm_xtensa_l32r(asm_xtensa_t *as, mp_uint_t reg, mp_uint_t label);
#define ASM_NUM_REGS_SAVED ASM_XTENSA_NUM_REGS_SAVED_WIN
#define REG_FUN_TABLE ASM_XTENSA_REG_FUN_TABLE_WIN
-#define ASM_ENTRY(as, nlocal) asm_xtensa_entry_win((as), (nlocal))
-#define ASM_EXIT(as) asm_xtensa_exit_win((as))
-#define ASM_CALL_IND(as, idx) asm_xtensa_call_ind_win((as), (idx))
+#define ASM_ENTRY(as, nlocal, name) asm_xtensa_entry_win((as), (nlocal))
+#define ASM_EXIT(as) asm_xtensa_exit_win((as))
+#define ASM_CALL_IND(as, idx) asm_xtensa_call_ind_win((as), (idx))
#endif