3 ms·
Wouldn't there be idioms in the assembly which represent compatibility with the old ABI? Couldn't you translate those directly in the assembly without having to
by jschwartzi 10y ago
Wouldn't there be idioms in the assembly which represent compatibility with the old ABI? Couldn't you translate those directly in the assembly without having to re-run the compilation?
ABI describes things like how the stack works, but at the assembly level the only stack is the one you implement, which is generally compatible with an ABI version.
- tremon 10y agoNot easily. What you are describing is annotating every entry point in a library with symbol tags, and annotating every function call with the same symbols. It basically requires you to have another JIT compilation phase or runtime library to resolve function calls. We do have examples of that (e.g. .net assemblies), but it requires a lot of infrastructure to support it. And there's still more than one stack implementation choice at the assembly level. For example, what is the correct order for passing parameters on the stack? What is the memory alignment for off-size stack parameters? Is the caller or the callee responsible for reclaiming the stack space at function completion? How are function return values passed back?