[PATCH] don't generate long nops on i686 (only when -march=[intel])
Quentin Neill
quentin.neill.gnu@gmail.com
Fri Aug 6 17:21:00 GMT 2010
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?)
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.
--
Quentin
More information about the Binutils
mailing list