And I still don’t have a «legal» way to read or set registers via Genode interface, need to use asm :(
Why don't you use setjmp/longjmp? Implementation are in the libc and repos/dde_linux/src/lx_kit/spec for our drivers.
Because golang runtime do use makecontext to replace addresses of functions and own stack, while jmpbuf is a kind of opaque structure... probably I have to manually select appropriate buf offsets and replace 2 out of 12 long int (while it is still unclear for me why there are 12 words in it while they use something like 9.5?)