[PATCH v2] X86: disambiguate unqualified btr, bts
Jim Grosbach
grosbach at apple.com
Tue Jul 16 15:01:26 PDT 2013
On Jul 16, 2013, at 1:26 AM, Ramkumar Ramachandra <artagnon at gmail.com> wrote:
> Ramkumar Ramachandra wrote:
>> Stephen Checkoway wrote:
>>> bt $n, mem becomes btl $(n % 32), mem + 4*(n / 32)
>>
>> Yeah, and the same logic should be applied to all bit-test
>> instructions. Pointers for a patch, please?
>
> It looks like doing this using instruction aliases will result in a
> huge amount of duplication, but that does seem to be the existing
> convention. The larger problem seems to be that
> MatchInstructionImpl() is too primitive: See d5b2f1a (move the
> "sh[lr]d op,op" -> "shld $1, op,op" aliases to the .td file.,
> 2010-11-06), where Lattner comments out a slew of instructions saying
> that the matcher is incapable of matching a fixed immediate. So, I'd
> like to look into improving MatchInstructionImpl(), which is generated
> at utils/TableGen/AsmMatcherEmitter.cpp:2853. Or is that a lost
> cause, and should be we open-coding it
> lib/Target/X86/AsmParser/X86AsmParser.cpp? I suppose we could inject
> something into ParseInstruction(), following the examples of outb, inb
> etc. Yeah, I think that's what we should do: I'll try to whip up a
> patch shortly.
No. The above rule is absolutely the wrong thing to do, as has been previously noted.
-Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130716/bb0fa495/attachment.html>
More information about the llvm-commits
mailing list