什么是寄存器%eiz? [英] What is register %eiz?

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

问题描述

在下面的汇编code,我甩了使用 objdump的

In the following assembly code that I dumped out using objdump:

lea    0x0(%esi,%eiz,1),%esi

什么是寄存器%eiz ?什么是preceding code是什么意思?

What is register %eiz? What does the preceding code mean?

推荐答案

请参阅的为什么GCC LEA EIZ

显然%eiz 是一个伪寄存器,只是计算结果为零时刻(如 R0 在MIPS )。

Apparently %eiz is a pseudo-register that just evaluates to zero at all times (like r0 on MIPS).

...

我终于找到使用Binutils大师伊恩·泰勒兰斯一个邮件列表后,揭示了答案。有时GCC插入NOP指令到code流,以确保适当的调整和类似的东西。 NOP指令需要一个字节,所以你会觉得需要你可以只添加尽可能多的。但根据伊恩·泰勒兰斯,这对芯片执行比许多短指令一长指令更快。因此,而不是插入7 NOP指令,而不是他们使用一个比扎罗LEA,它采用了7个字节,是语义上等同于一个NOP。

I eventually found a mailing list post by binutils guru Ian Lance Taylor that reveals the answer. Sometimes GCC inserts NOP instructions into the code stream to ensure proper alignment and stuff like that. The NOP instruction takes one byte, so you would think that you could just add as many as needed. But according to Ian Lance Taylor, it’s faster for the chip to execute one long instruction than many short instructions. So rather than inserting seven NOP instructions, they instead use one bizarro LEA, which uses up seven bytes and is semantically equivalent to a NOP.

这篇关于什么是寄存器%eiz?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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