Open
Description
Hi,
The book says 'The writes into 32-bit parts, however, fill the upper 32 bits of the full register with sign bits. For example, zeroing eax will zero the entire rax, storing -1 into eax will fill the upper 32 bits with ones.'.
However Intel manual says in section 3.4.1.1:
32-bit operands generate a 32-bit result, zero-extended to a 64-bit result in the destination general-purpose register
I checked this in Visual Studio using a simple program:
.code
SomeFunction proc
mov eax, -1
ret
SomeFunction endp
end
The RAX register was zero extended as described in Intel manual.
Is this an error in the book?
Thanks and Regards
Dibyendu
Metadata
Metadata
Assignees
Labels
No labels
Activity
sayon commentedon May 6, 2018
Hello,
it is indeed an error. A similar error for another section is already present in errata, but not this specific one.
I will add it to the errata.
Thank you very much for reporting and helping to get rid of errors for a better experience!