让我们看一下Linux中内联汇编的特定用法。
Let's take a look at the specific usage of inline assembly in Linux.
GCC为内联汇编提供特殊结构,它具有以下格式。
GCC provides the special construct "asm" for inline assembly, which has the following format.
该列表肯定不完整;只包括了与内联汇编相关的那些规则。
The list is by no means complete; I've included only those rules pertinent to inline assembly.
在切换到新平台上时明确需要移植的事情之一是内联汇编。
One of the few things which is definitely going to require porting when switching platforms is inline assembly.
JSNI可以视为内联汇编代码的web对等物,可以用来。
JSNI can be considered the Web equivalent of inline assembly code. You can use it to.
在现代系统上,程序员使用内联汇编进行优化的机会已经很少了。
In modern systems, the chances that inline assembly is a good use of programmer time for optimization are virtually nil.
举例来说,设计利用缓存溢出的程序很可能会对目标平台使用内联汇编。
For instance, a program designed to exploit a buffer overflow is very likely to use some inline assembly for the target platform.
总的来说,内联汇编非常巨大,它提供的许多特性我们甚至在这里根本没有涉及到。
On the whole, inline assembly is huge and provides a lot of features that we did not even touch on here.
就运行时间而言是最轻便的,大多数情况下只需要单条内联汇编指令就可以上锁或解锁。
It is the lightest as execution time, often a lock or unlock becomes just a single inlined assembler instruction.
内联汇编有时也是必须的,举例来说,当您需要确保特定指令集都在相同的缓存线上(否则就会浪费内存映像)时。
Inline assembly is also sometimes needed when you have to, for instance, ensure that a particular set of instructions are in the same cache line, or otherwise mess around with memory maps.
除了一系列的选项之外,当 -qipa选项处于可用状态时,如果汇编器不能进行向量化,那么它会试着在决定调用它们之前去内联MASS标量函数。
In addition to any of the preceding sets of options, when the -qipa option is in effect, if the compiler cannot vectorize, it tries to inline the MASS scalar functions before deciding to call them.
这个编译器也允许在一个函数的任何地方嵌入内联的汇编代码。另外,以汇编代码开发的例程也可以被调用。
The compiler also allows inline assembler code to be embedded anywhere in a function. In addition, routines developed in assembly can also be called.
这个编译器也允许在一个函数的任何地方嵌入内联的汇编代码。另外,以汇编代码开发的例程也可以被调用。
The compiler also allows inline assembler code to be embedded anywhere in a function. In addition, routines developed in assembly can also be called.
应用推荐