mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 06:23:39 +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
@@ -28,6 +28,7 @@ tinygo_scanCurrentStack:
|
||||
tinygo_longjmp:
|
||||
// Note: the code we jump to assumes eax is set to a non-zero value if we
|
||||
// jump from here.
|
||||
movl 8(%esp), %eax // jumpPC (stash in volatile register)
|
||||
movl 4(%esp), %esp // jumpSP
|
||||
movl 4(%esp), %eax
|
||||
movl 0(%eax), %esp // jumpSP
|
||||
movl 4(%eax), %eax // jumpPC (stash in volatile register)
|
||||
jmpl *%eax
|
||||
|
||||
Reference in New Issue
Block a user