[PATCH] don't generate long nops on i686 (only when -march=[intel])

H.J. Lu hjl.tools@gmail.com
Fri Aug 6 18:02:00 GMT 2010


On Fri, Aug 6, 2010 at 9:59 AM, Quentin Neill
<quentin.neill.gnu@gmail.com> wrote:
> On Fri, Aug 6, 2010 at 11:35 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> I was wondering if it is necessary and possible to add the negative option
>> to all ISAs?
>>
>> --
>> H.J.
>
> It is feasible, I looked into this.
>
> One problem with the current setup, there is no way to disambiguate
> between ".nop" and ".nonop" and ".nononop" (etc) because we're using a
> pair of entries in the init table, and then detecting the "no" prefix.
>
> I would do it this way.
>
>
> 1) remove my 'negated' field - it wouldn't be needed, and remove all
> ".noXXX" entries - they will be synthesized
> 2) add a field to distinguish between ISAs and CPU (not needed if
> there is another way already?)

Yes, ISA starts with a `.'.

> 3) first try to match .XXXX in ISA or CPU list - if match, apply flags with OR
> 4) next if leading XX is "no", remove and find exact match for
> remaining XX in ISA only, if match apply flags with AND NOT
>
> The first match 3) will succeed for ".nop" even though it starts with
> "no", fail for "nonop"
> The second match 4) will succeed only for ".nonop" but not for ".nop"
>
> I could implement this in my patch, or in a separate patch?
>
> P.S. I haven't committed yet, having problems with my nascent
> sourcware.org account.

I will commit your patch for you first.

One problem is .nosse turns off ALL SSE/SSE2/..., not just
SSE. So what should ".arch .nosse3" disable? Should it also
disable SSSE3, SSE4, AVX, ....


-- 
H.J.



More information about the Binutils mailing list