0

I know that the CPU doesn't care about the sign bit, because of two's complement. But when using different operand sizes, then the source value gets sign extended to the destination's size.

xor rax, rax
add rax, byte 0xAD ; adds 0xFFFFFFFFFFFFFFAD to RAX

Is there an add instruction that adds values without sign-extension (and avoids null bytes)?

(I'm working with a x86_64 architecture)

Jester
  • 56,577
  • 4
  • 81
  • 125
Cubi73
  • 1,891
  • 3
  • 31
  • 52

0 Answers0