Skip to content

Section 1.3.1 #66

Open
Open
@dibyendumajumdar

Description

@dibyendumajumdar

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions