What's the point of LEA EAX, [EAX]?

前端 未结 3 488
清酒与你
清酒与你 2020-12-04 11:12
LEA EAX, [EAX]

I encountered this instruction in a binary compiled with the Microsoft C compiler. It clearly can\'t change the value of EAX. Then w

3条回答
  •  情歌与酒
    2020-12-04 11:33

    LEA EAX, [EAX]
    

    Indeed doesn't change the value of EAX. As far as I understand, it's identical in function to:

    MOV EAX, EAX
    

    Did you see it in optimized code, or unoptimized code?

提交回复
热议问题