首页 > x86汇编当中imull 和 mull 区别

x86汇编当中imull 和 mull 区别

x86汇编当中32位乘法imul 并不区分有无符号, 据说原因是因为结果本身就是从一个64位的数截断至32位得到的. 我联想到, 对于64位乘法, 并且分为有符号imull和无符号mull.

那我想知道 : imull和mull到底有什么区别呢? 从底层实现的角度来说难道不是一样的吗?


google之后才知道, 在处理64位乘法的时候, 两个指令在实现上是没有区别的, 唯一的区别在于对flag的设置...

for the one operand forms, they are almost the same, but differ in
terms of CF and OF (typically, we don't care about them in this case
anyways).

【热门文章】
【热门文章】