Yes, you are right. Tested on the H/W, It clears the upper 32bits. 😊

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marvin HĂ€user
Sent: Sunday, March 19, 2023 3:07 PM
To: S, Ashraf Ali <ashraf.al...@intel.com>
Cc: devel@edk2.groups.io; Chiu, Chasel <chasel.c...@intel.com>; Desimone, 
Nathaniel L <nathaniel.l.desim...@intel.com>; Zeng, Star <star.z...@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] IntelFsp2Pkg: Fix NASM X64 build warnings.

Yes - it does. Most (if not all?) operations on 32-bit registers zero-extend 
the corresponding 64-bit register. This is an AMD64 / Intel 64 design to combat 
partial register stall. Please consult the SDM (or at least try it out).

What I didn’t realize is that “mov eax, eax” apparently defeats register 
renaming optimisations: https://stackoverflow.com/a/45660140

Best regards,
Marvin


On 19. Mar 2023, at 10:07, S, Ashraf Ali 
<ashraf.al...@intel.com<mailto:ashraf.al...@intel.com>> wrote:
ï»ż
Hi.,

Nope, it will not clear the upper 32bit right.


From: Marvin HĂ€user <mhaeu...@posteo.de<mailto:mhaeu...@posteo.de>>
Sent: Sunday, March 19, 2023 3:38 AM
To: S, Ashraf Ali <ashraf.al...@intel.com<mailto:ashraf.al...@intel.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH v2] IntelFsp2Pkg: Fix NASM X64 build warnings.

Hi Ashraf,

”mov eax, eax” does clear the high 32 Bits of rax.

Best regards,
Marvin



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101369): https://edk2.groups.io/g/devel/message/101369
Mute This Topic: https://groups.io/mt/97678369/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to