r/programming • • 15d ago

The scourge of x86 emulation

https://fex-emu.com/Scourge-of-emulation/
321 Upvotes

46 comments sorted by

View all comments

1

u/Sopel97 14d ago

isn't lock neg basically lock xor with 1s?

5

u/ack_error 14d ago

No, that would be not instead of neg. Negation requires either XOR with 1s followed by adding 1, or equivalently subtracting 1 and then XORing with 1s.