unicorn icon indicating copy to clipboard operation
unicorn copied to clipboard

SAL instruction wrong behavior

Open cr3m opened this issue 1 year ago • 1 comments

I am using Unicorn-based emulator (Speakeasy) to emulate a sample but I saw that seems like the SAL instruction is not working properly

0x1401df85b: mem=0xd3cd2900000000f9
0x1401df85b: sal word ptr [rsp + r8 + 3], cl                             ; cf=0x0
0x1401df861: mem=0xd3cd2900000001f2
0x1401df861: inc rdx                                                     ; cf=0x1

The CF flag changed from 0 -> 1 while it shouldn't

SAL (or its synonym, SHL) shifts the bits of the operand upward. The high-order bit is shifted into the carry flag, and the low-order bit is set to 0.

cr3m avatar Sep 10 '24 08:09 cr3m

Seems dup of #1717

wtdcode avatar Sep 10 '24 08:09 wtdcode

Closing as no activities.

wtdcode avatar Dec 29 '24 07:12 wtdcode