The frame return address is still used for relative jumping, to update Pike_fp->pc etc. Good point, that rules out any sort of stubs afaics.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-08-08 01:30: Subject: Machine code efficiency
How about encoding a return like this:
push static_dangerous_jump_stub jmp F_RETURN
static_dangerous_jump_stub: jmp *%eax
That way you will only need one stub for all of the return opcodes.
Although, if you still use the PROG_COUNTER() macro for relative jumping, that wouldn't work very well...
/ Fredrik (Naranek) Hubinette (Real Build Master)