never add rts to inline asmsubs and always inline them regardless of optimization setting

otherwise they can't specify a sequence of assembly instructions that should be inserted in-place, such as those that manipulate the cpu stack.
for instance cx16.irqsafe_set_irqd() / cx16.irqsafe_clear_irqd()
This commit is contained in:
Irmen de Jong
2023-07-30 14:50:02 +02:00
parent b89ad4b328
commit 0816a57032
4 changed files with 4 additions and 8 deletions

View File

@@ -271,9 +271,7 @@ internal class ProgramAndVarsGen(
internal fun translateAsmSubroutine(sub: PtAsmSub) {
if(sub.inline) {
if(options.optimize) {
return
}
return // subroutine gets inlined at call site.
}
asmgen.out("")