[PATH] AMD MWAITX enablement
Pawar, Amit
Amit.Pawar@amd.com
Fri Jun 26 16:39:00 GMT 2015
PFA MWAITX updated patch. Is it OK?
-----Original Message-----
From: H.J. Lu [mailto:hjl.tools@gmail.com]
Sent: Friday, June 26, 2015 10:00 PM
To: Pawar, Amit
Cc: binutils@sourceware.org; Jan Beulich
Subject: Re: [PATH] AMD MWAITX enablement
On Fri, Jun 26, 2015 at 9:26 AM, Pawar, Amit <Amit.Pawar@amd.com> wrote:
>
> On Fri, Jun 26, 2015 at 8:00 AM, Pawar, Amit <Amit.Pawar@amd.com> wrote:
>>
>> Comments are fixed and please suggest how to allow following
>> instructions without operands
>>
>> --- Required ----
>> label:
>> monitorx
>> mwaitx
>> --------------------
>>
>> ---- Accepted----
>> monitorx %eax, %ecx, %edx
>> mwaitx %eax, %ecx, %ebx
>> --------------------
>> by adding following code
>>
>> if (i.operands != 3)
>> abort ();
>>
>>
>> -----Original Message-----
>> From: H.J. Lu [mailto:hjl.tools@gmail.com]
>> Sent: Friday, June 26, 2015 5:26 PM
>> To: Pawar, Amit
>> Cc: binutils@sourceware.org; Jan Beulich
>> Subject: Re: [PATH] AMD MWAITX enablement
>>
>> On Fri, Jun 26, 2015 at 4:09 AM, Pawar, Amit <Amit.Pawar@amd.com> wrote:
>>>
>>> Operand check is required at that line as instructions MONITORX/MWAITX are accepted without operands also.
>>
>> Add
>
> You have
>
> if (i.tm.cpu_flags.bitfield.cpumwaitx && i.operands > 0)
> {
> ....
> }
> [Pawar, Amit] This condition was included to handle mwaitx cpu
> instructions with more than zero operands and skips for zero operands.
>
> If i.operands == 0, you won't reach
>>[Pawar, Amit] Zero operands instruction are allowed but should not
>>enter here as it will get
> handled by normal code.
>
> if (i.operands != 3)
> abort ();
> [Pawar, Amit] Will throw error for zero operand instructions, as this
> is inside if case and which is not required here.
I meant
if (i.tm.cpu_flags.bitfield.cpumwaitx && i.operands > 0)
{
if (i.operands != 3)
abort ();
...
}
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwaitx_v5.patch
Type: application/octet-stream
Size: 24997 bytes
Desc: mwaitx_v5.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20150626/dc695c9d/attachment.obj>
More information about the Binutils
mailing list