The first problem was gcc flag -mflat, removing that made the code better. Then there were these global register mangles. I made a wrapper around setjmp and longjmp and now the emulators can execute several blocks until crashing. Some helper calls don't work.