I understood the difference between movz
and movs
.
movz
fills the empty bytes with zeros while movs
fills them with sign bit (zeros or ones).
However, I came accross the following example
movabsq $0x0011223344556677, %rax
movb $0xAA, %dl
movb %dl, %al
movsbq %dl, %rax
After line 3, %rax = 00112233445566AA
. I undertood untill this. But I could not get why %rax is equal to FFFFFFFFFFFFFFAA
after line 4. Shouldn't it be 00000000000000AA
because empty bits are filled with zero as %dl is positive ?