Assuming we have some value in RAX. We wish to NOT the lower 32-bits of RAX, and leave the upper 32 bits unchanged. Is there a nice way of doing this?
A command like:
not eax
Unfortunately zero extends.
I can do it as follows:
mov rbx,rax
not ebx ; or not rbx
and rax, 0xffffffff00000000
or rax, rbx
but it feels like there should be a nicer way.
You could XOR it with 0x00000000ffffffff
, that would flip the bottom 32 bits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With