|
From: Josef W. <Jos...@gm...> - 2002-11-17 00:26:05
|
On Saturday 16 November 2002 19:17, Jeremy Fitzhardinge wrote: > On Sat, 2002-11-16 at 04:09, Julian Seward wrote: > ... > > When an unchained translation wants to make a jump to a known > > (orig)address, it pushes the orig-address it wants to call, and *call= s* > > "patch_me" which is a short piece of assembly code. This pops the ar= gs > > (orig-addr) and also pops the return address -- which points just aft= er > > the call insn on the original translation. patch_me can arrange to f= ind > > the translation and patch the caller to jump directly to it. Just an idea: Why not simply use indirect jumps and patching the jump add= ress,=20 same as the symbol resolving with calls to shared lib functions is doing? The jump address would be initialised to "patch_me" and later to the=20 translated code (by patch_me). You wouldn't need chained/unchained versions or patching generated code, = and=20 whenever discarding a translation, set the according jump address back to= =20 "patch_me". Seems way easier for me in a first step. Sorry if I'm totally wrong here :-) Josef |