2 versions of printInstruction()

Hi, LLVMers,

I notice that there are two versions of printInstruction() generated
by tablegen:

(1) XXXInstPrinter::printInstruction(const MCInst *MI, raw_ostream
&os), like for X86.
(2) XXXAsmPrinter::printInstruction(const MachineInstr *MI,
raw_ostream &os), like for Sparc.

I guess Sparc backend directly transform MachineInstr objects into
ostream, while X86 backend convert MachineInstr into MCInst first,
then prints out MCInst as text.

So, why does tablegen result in such differences?

Best regards.

OK, the field "bit isMCAsmWriter" of class AsmWriter in Target.td
defaults to 0 determines which version of printInstruction will be
generated.

Regards.