|
From: Julian S. <js...@ac...> - 2002-11-17 03:20:24
|
> > > When an unchained translation wants to make a jump to a known > > > (orig)address, it pushes the orig-address it wants to call, and *calls* > > > "patch_me" which is a short piece of assembly code. This pops the args > > > (orig-addr) and also pops the return address -- which points just after > > > the call insn on the original translation. patch_me can arrange to > > > find the translation and patch the caller to jump directly to it. > > Just an idea: Why not simply use indirect jumps and patching the jump > address, 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 > translated code (by patch_me). > You wouldn't need chained/unchained versions or patching generated code, > and whenever discarding a translation, set the according jump address back > to "patch_me". > Seems way easier for me in a first step. Josef I don't really know how the shared lib stuff works. Can you explain in a little more detail how your proposal would work? Thanks, J |