ia32/ia64上的ADC和ADCX指令之间有什么区别? [英] What is the difference between the ADC and ADCX instructions on ia32/ia64?

查看:254
本文介绍了ia32/ia64上的ADC和ADCX指令之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我遇到ADCX指令时,我正在浏览英特尔软件开发人员手册,该指令以前是我所不知道的.其编码为66 0F 38 F6.它似乎与ADC指令几乎相同,所以为什么在以下情况下使用ADCX:

I was looking through the Intel software developer manual when I encountered the ADCX instruction, which was previously unknown to me; its encoding is 66 0F 38 F6. It seems to be almost identical to the ADC instruction, so why would you use ADCX when:

  • 仅在现代CPU中受支持
  • 指令编码占用更多空间(4个字节,而ADC为1个字节)
  • it is only supported in modern CPUs
  • instruction encoding takes more space (4 bytes versus 1 for ADC)

是否还有其他副作用或特殊情况,证明ADCXADC有优势?将其添加到指令表中一定有一定的理由.

Is there some other side effect, or special case, where ADCX proves advantageous over ADC? There must have been some good reason why this was added to the instruction repertoire.

推荐答案

引用本文

adcx和adox指令是adc指令的扩展, 设计用于支撑两个独立的进位链.它们定义为:

The adcx and adox instructions are extensions of the adc instruction, designed to support two separate carry chains. They are defined as:

adcx dest/src1, src2
adox dest/src1, src2

两条指令都计算src1和src2的总和加上一个进位并生成一个 输出总和dest和一个进位.两者之间的区别 指令是adcx将CF标志用于进位和进位 out(使OF标志保持不变),而adox指令使用 用于进位和执行的OF标志(保留CF标志 不变).

Both instructions compute the sum of src1 and src2 plus a carry-in and generate an output sum dest and a carry-out. The difference between these two instructions is that adcx uses the CF flag for the carry in and carry out (leaving the OF flag unchanged), whereas the adox instruction uses the OF flag for the carry in and carry out (leaving the CF flag unchanged).

这些指令相对于ADC的主要优点是它们 支持两条独立的进位链.

The primary advantage of these instructions over adc is that they support two independent carry chains.

这篇关于ia32/ia64上的ADC和ADCX指令之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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