mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
runtime: load sp and pc inside tinygo_longjmp
This is a small change to make it easier to support architectures that need to restore more than just the sp and pc registers. In particular, it is needed for the AVR architecture that needs to restore the frame pointer (Y register).
This commit is contained in:
committed by
Ron Evans
parent
c119721e3b
commit
49e22fe678
@@ -40,6 +40,8 @@ tinygo_longjmp:
|
||||
.cfi_startproc
|
||||
// Note: the code we jump to assumes r0 is set to a non-zero value if we
|
||||
// jump from here (which is conveniently already the case).
|
||||
|
||||
ldm r0, {r0, r1}
|
||||
mov sp, r0 // jumpSP
|
||||
mov pc, r1 // jumpPC
|
||||
.cfi_endproc
|
||||
|
||||
Reference in New Issue
Block a user