tests/inlineasm: Add test for PUSH LR and POP PC.
This commit is contained in:
parent
b0bcb3862b
commit
d6c59c9d72
@ -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())
|
||||
|
@ -1 +1,2 @@
|
||||
1
|
||||
7
|
||||
|
Loading…
x
Reference in New Issue
Block a user