On Sun, Oct 19, 2014 at 7:09 PM, Fan, Jeff <[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?

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?

-Jordan

> -----Original Message-----
> From: Tian, Feng [mailto:[email protected]]
> Sent: Monday, October 20, 2014 9:02 AM
> To: [email protected]
> Subject: Re: [edk2] [PATCH] MdeModulePkg DebugSupportDxe: Fix build error 
> with GNU assembler
>
> Hi, Jordan
>
> I agree with Andrew. The best fix should be "movw %es,  %ax"
>
> I searched MdePkg and MdeModulePkg, looks like only DebugSupportDxe .S file 
> has such issue.
>
> Is it possible to make a clean-up?
>
> Best Regards
> Feng
>
> -----Original Message-----
> From: Jordan Justen [mailto:[email protected]]
> Sent: Saturday, October 18, 2014 00:27
> To: [email protected]
> Subject: Re: [edk2] [PATCH] MdeModulePkg DebugSupportDxe: Fix build error 
> with GNU assembler
>
> On Fri, Oct 17, 2014 at 9:11 AM, Andrew Fish <[email protected]> wrote:
>>
>>> On Oct 17, 2014, at 9:05 AM, Jordan Justen <[email protected]> 
>>> wrote:
>>>
>>> The GNU assembler (2.24.51.20140918) is failing to build when movw is
>>> used on this instruction. Instead use the mov instruction, which
>>> matches the other cases of loading segment registers.
>>>
>>> The error message seen is:
>>>  AsmFuncs.iii:283: Error: incorrect register `%rax' used with `w'
>>> suffix
>>>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Jordan Justen <[email protected]>
>>> ---
>>> MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
>>> b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
>>> index 9783ec6..7f0919e 100644
>>> --- a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
>>> +++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
>>> @@ -280,7 +280,7 @@ ExtraPushDone:
>>>
>>>                 mov     %ds, %rax
>>>                 pushq   %rax
>>> -                movw    %es, %rax
>>> +                mov     %es, %rax
>>
>> Is the issue the w or the %rax? Do you need to use the smaller register name 
>> with movw?
>
> I noticed the other instructions were using mov rather than movw with rax and 
> the segment registers, so I just matched that. (See move from ds to rax just 
> above.)
>
> -Jordan
>
> ------------------------------------------------------------------------------
> 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
>
> ------------------------------------------------------------------------------
> 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
>
> ------------------------------------------------------------------------------
> 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

------------------------------------------------------------------------------
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

Reply via email to