|32 to 64 bit recompiler comments firstname.lastname@example.org (2005-08-24)|
|Re: 32 to 64 bit recompiler comments email@example.com (M Wolfe) (2005-10-08)|
|From:||"M Wolfe" <firstname.lastname@example.org>|
|Date:||8 Oct 2005 17:35:29 -0400|
|Organization:||Posted via Supernews, http://www.supernews.com|
Having looked at this problem, the problem is the changes in the ABI,
the calling conventions. 32-bit x86 code passes arguments on the
stack, 64-bit uses registers for the first several arguments. At the
binary level, it's difficult to determine how many stack items were
arguments (turning a 32-bit call into a 64-bit call) or, at the
callee, how many register arguments should be pushed onto the stack.
Mechanically translating the rest of the code is much easier, though
there is still the problem is fitting a 64-bit pointer into a 32-bit
[Before you can try to fit a 64 bit pointer into a 32 bit bucket, you
need to figure out which arguments are pointers and which aren't,
returning to the AI problem. Unless you can do it with shims, there's
no hope. -John]
<email@example.com> wrote in message news:firstname.lastname@example.org...
> We need 64 bit versions of some plugins to run in the 64 bit apps. Is
> there any work to make a 32-bit to 64-bit recompiler, or relinker? My
> search shows this is a hard problem for disparate processor families
> but does this sound possible for Opteron? Curiously, the vendor has
> yet to release the 64 bit compilation for Linux of its code.
> What would be the cost to make such a tool? 1 expert man year? 10?
> [Mechanically translating the 32 bit instructions into 64 bit
> instructions wouldn't be hard, but it also wouldn't give you anything
> useful. This sounds like an AI problem to me, since you'd have to
> figure out what the data structures are that are passed in and out.
> If you know what the interface specs to the plugins are, you might be
> able to build shims that are called from the 64 bit code, reformat the
> input arguments to their 32 bit equivalents, somehow leap into 32 bit
> mode to run the 32 bit plugin, leap back when it returns, reformat the
> output arguments, and return. Gross though that is, it'd be a lot
> easier than figuring out and translating the 32 bit code. -John]
Return to the
Search the comp.compilers archives again.