![](/img/trans.png)
[英]Assembly How to translate IMUL opcode (with only one oprand) to C code
[英]What is 'xorl' and 'imul' are used for in this assembly code? Can it be converted to c Code?
int func2(int x, int y)
movl 4(%esp), %eax
addl 8(%esp), %eax
xorl $255,%eax
imul 8(%esp), %eax
sall $4, eax
與此 function 對應的 C 代碼類似於
int func2(int x, int y)
{
int eax;
eax = x;
eax += y;
eax ^= 0xff;
eax *= y;
eax <<= 4;
return (eax);
}
那應該做什么......我不知道。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.