[llvm-commits] Support for explicit argument form of X86 string instructions

Joerg Sonnenberger joerg at britannica.bec.de
Tue Mar 15 12:04:54 PDT 2011


On Tue, Mar 15, 2011 at 11:43:54AM -0700, Chris Lattner wrote:
> 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.

OK.

> +bool X86ATTAsmParser::isDstOp(X86Operand &Op) {
> 
> Please add a doxygen comment explaining what pattern this matches. 

OK.

> 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.

It does want to know if it is 32bit or 64bit mode. That's the only
reason why it is in X86ATTAsmParser. Passing down the variable feels
like a greater cludge.

> 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?

MatchAndEmitInstruction and doesn't the register anymore, so it can't do
that matching, I think. The actual instructions can't be used without
suffix.

Joerg



More information about the llvm-commits mailing list