> On Oct 21, 2014, at 11:27 PM, Jordan Justen <[email protected]> wrote:
>
> On Sun, Oct 19, 2014 at 7:09 PM, Fan, Jeff <[email protected]
> <mailto:[email protected]>> wrote:
>> SourceLevelDebugPkg/DebugAgentLib x64 also used movw %es, %rax.
>> We need to fix it also.
>>
>> And UefiCpuPkg/Library/CpuExceptionLib x64 used movl %es, %eax.
>> We could clean it to make a consistence in code base.
>
> More than that, it appears that the MASM code does a mov rax, es too.
>
> I'm not sure that mov ax, es is really much of an improvement, and I'm
> not interested in cleaning all that code up. I'd just like
> MdeModulePkg to build. :) Would one of you be interested in pursuing
> this cleanup?
>
> I'm also not sure, but it could be that the mov rax, es actually does
> a zero extended move, so maybe the mov ax, es would be different.
> Would that impact the code that looks at this value later?
>
Actually it looks like eax is the correct form for X64 code ...
On the MASM side for X64 https://defuse.ca/online-x86-assembler.htm
<https://defuse.ca/online-x86-assembler.htm>
mov rax, es
mov eax ,es
mov ax, es
mov es, rax
mov es, eax
mov es, ax
0: 48 8c c0 mov rax,es
3: 8c c0 mov eax,es
5: 66 8c c0 mov ax,es
8: 48 8e c0 mov es,rax
b: 8e c0 mov es,eax
d: 8e c0 mov es,eax
ax generates 0x66 - operand-size override prefix
rax generates 0x48 - REX use 64-bit operand size.
> Anyway, I think that my original patch makes the code more consistent
> with the current other GNU asm and MASM code. So, maybe it is okay as
> a small next step?
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel