Optimize space usage of supercard platform (#74)

This commit is contained in:
Edoardo Lolletti
2025-12-28 17:38:28 +01:00
committed by GitHub
parent 9f6311014d
commit 7134c4b330
8 changed files with 81 additions and 68 deletions

View File

@@ -23,30 +23,33 @@
.pool
.endm
#ifdef LITE
.macro CALL func, interworkLabel
ldr r4, \func\()_\interworkLabel\()Lite_address
LOAD_INTERWORK_FUNCTION \func \interworkLabel r4
bl \interworkLabel
.endm
#ifdef LITE
.macro INTERWORK_FUNCTION func, interworkLabel
.global \func\()_\interworkLabel\()Lite_address
\func\()_\interworkLabel\()Lite_address:
.word 0
.endm
#else
.macro CALL func, interworkLabel
ldr r4, \func\()_\interworkLabel\()_address
bl \interworkLabel
.macro LOAD_INTERWORK_FUNCTION func, interworkLabel, reg
ldr \reg, \func\()_\interworkLabel\()Lite_address
.endm
#else
.macro INTERWORK_FUNCTION func, interworkLabel
.global \func\()_\interworkLabel\()_address
\func\()_\interworkLabel\()_address:
.word 0
.endm
.macro LOAD_INTERWORK_FUNCTION func, interworkLabel, reg
ldr \reg, \func\()_\interworkLabel\()_address
.endm
#endif