tests/inlineasm: Add test for PUSH LR and POP PC.

This commit is contained in:
Christian Zietz 2022-04-04 10:32:36 +02:00 committed by Damien George
parent b0bcb3862b
commit d6c59c9d72
2 changed files with 13 additions and 0 deletions

View File

@ -6,4 +6,16 @@ def f(r0, r1, r2):
pop({r1, r2})
@micropython.asm_thumb
def g():
b(START)
label(SUBROUTINE)
push({lr}) # push return address
mov(r0, 7)
pop({pc}) # return
label(START)
bl(SUBROUTINE)
print(f(0, 1, 2))
print(g())

View File

@ -1 +1,2 @@
1
7