English 中文(简体)
是否使用英特尔公司的登记册来提高效率?
原标题:Does using an Intel register for its "intended purpose" increase efficiency?

rel=“noreferer”> 第条规定,每个登记册都有预定目的,更重要的是,

When the engineers at Intel designed the original 8086 processor, they had a special purpose in mind for each register. As they designed the instruction set, they created many optimizations and special instructions based on the function they expected each register to perform. Using registers according to Intel s original plan allows the code to take full advantage of these optimizations. Unfortunately, this seems to be a lost art. Few coders are aware of Intel s overall design, and most compilers are too the simplistic or focused on execution speed to use the registers properly. Understanding how the registers and instruction set fit together, however, is an important step on the road to effortless size-coding.

是否有其他来源证实这一条? 如果是的话,我真的要检查一下。

请指出: I m不讨论像<代码>STOS”使用<代码>><>edi的快速运行情况——我很想知道,如果我使用<代码>eax和作为反射器,是否出现任何性能退化? 或者这只是关于可读性?

最佳回答

无,实际上更没有——或至少经常有进展。 利用ECX作为反让,请你使用LOOP指令。 一方面,这是一个重大优势,但在最近几家加拿大邮联上,一项《禁止杀伤人员地雷公约》的执行要长于DEC ECX/JNZ的合并。 可能的好处是,它减少了记忆带宽的使用,这种使用越来越经常地是一种瓶颈。 如果你能够使用诸如“LOOPNZ”之类的其他形式,这也会是一种好处,因为后者可能比较复杂,难以用单独的指示进行模拟。

问题回答

指令中载有使用特定登记册的指示,这些登记册比以任何登记册为目标的相应职能小(而且往往更快)。





相关问题
List of suspected Malicious patterns

I am doing an anti-virus project by disassembling its code and analyzing it. So I want a list of the Suspected Malicious pattern codes, so I can observe which is suspected and which is not? So I want ...

Prefetch for Intel Core 2 Duo

Has anyone had experience using prefetch instructions for the Core 2 Duo processor? I ve been using the (standard?) prefetch set (prefetchnta, prefetcht1, etc) with success for a series of P4 ...

How are mutex and lock structures implemented?

I understand the concept of locks, mutex and other synchronization structures, but how are they implemented? Are they provided by the OS, or are these structures dependent on special CPU instructions ...

Installing GNU Assembler in OSX

No matter how hard I google, I can t seem to find a (relatively) easy-to-follow instruction on how to install the GNU Assembler on a mac. I know I can use gcc -c (Apple Clang on a Mac) to assemble .s ...

8086 assembler,INT 16,2

I got stuck at this thing,I want to see if right shift button has been pressed,so I have this assambler code: mov ah,2 int 16h ;calling INT 16,2 - Read Keyboard Flags interrupt mov ah,...

Translate a FOR to assembler

I need to translate what is commented within the method, to assembler. I have a roughly idea, but can t. Anyone can help me please? Is for an Intel x32 architecture: int secuencia ( int n, ...

热门标签