有ASM编译器吗? [英] Are there any ASM compilers?

查看:95
本文介绍了有ASM编译器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道ASM通常是通过汇编程序运行的,并且导致最终二进制文件或多或少的一对一映射,但这不是我要考虑的。

I know ASM is generaly run through an assembler and result in a more or less one to one mapping to the final binary but that's not what I'm thinking of.

是否有人开发了一种将ASM(或目标文件)视为一种可以在其上进行全部优化的编译语言的工具?虽然这样的工具可能在其中并不特别有用自我,它可以做一些事情,例如从封闭的源静态库中进行函数内联。

Does anyone make a tool that treats ASM (or object files) as a complied language that it can perform the full gamut of optimizations on? While such a tool might not be particularly useful in and of it's self, it could do things like function inlining from closed source static libraries.

推荐答案

虽然我同意 travelboy的答案,因为任何这样的汇编汇编语言都不再是汇编语言,我有提到有重新编译器和JIT,它们的源语言是机器语言(甚至不是汇编语言)。

while I agree with travelboy's answer in that any such 'compiled assembly' language wouldn't be assembly anymore, I have to mention that there are 'recompilers', and JITs whose source language is machine language (not even assembly).

这些程序需要一堆可执行代码,通常已经加载了并准备执行并对其进行转换,从而认识到变化构造体的完整性,并用更好,更快,更安全或更不同的版本替换即可。

These programs take a bunch of executable code, typically already loaded and ready to execute, and transform it, recognizing a varyiety of constructs and replacing with different versions, which can be better, faster, safer or just different.

qemu是一个例子。它是CPU模拟器的原始形式,它通过从给定的CPU二进制文件重新编译到另一个CPU中以执行代码来工作(二进制翻译)。但是,当两个CPU都相同时,它也可以工作,在这种情况下,转换允许特权代码通过突围硬件仿真器而在VM环境中执行。

qemu is an example of this. In it's original form is a CPU emulator that works by recompiling from a given CPU binary into a different CPU for execution (Binary Translation). But it can also work when both CPUs are the same, in this case the transformation allows privileged code to execute in a VM environment by 'breaking out' to the hardware emulator.

非常有趣的示例是HP Dynamo(旧Ars Technica文章),该研究软件通过重新编译HP PA-8000二进制文件实现了意外的加速。

A very interesting example is HP Dynamo (old Ars Technica article), a research software that achieved unexpected speedups by recompiling HP PA-8000 binaries.

这篇关于有ASM编译器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆