[llvm-commits] Support for explicit argument form of X86 string instructions
Chris Lattner
clattner at apple.com
Tue Mar 15 11:43:54 PDT 2011
On Mar 6, 2011, at 3:24 PM, Joerg Sonnenberger wrote:
> Hi all,
> the attached patch implements the various explicit argument forms of the
> X86 string instructions. They are used for documentation purposes, but
> the use of segment overrides make them hard to specify with the normal
> InstAlias syntax. This covers the ins, outs, movs, lods and stos family
> of instructions. For lods and stos, both the implicit and explicit size
> version is recognized.
Hi Joerg,
Some questions, comments:
Please do not accept (%dx) for ins and outs. I know that we accept them for in/out, but this is just because of compatibility with specific broken patterns in existing code, it isn't something that should spread to other places. This eliminates the need for isPortDxOp.
+bool X86ATTAsmParser::isDstOp(X86Operand &Op) {
Please add a doxygen comment explaining what pattern this matches. Also, I think this can just be a static function, it doesn't need to be a method on X86ATTAsmParser. Likewise for the other predicates.
Instead of handling "lods" and "stos" in ParseInstruction, can't you just ignore these two cases and let the suffix search code in MatchAndEmitInstruction handle them?
-Chris
More information about the llvm-commits
mailing list