Inst field in MSP430InstrFormats.td

Hello,

Within the file "MSP430InstrFormats.td" there is a class called
"MSP430Inst" which has "Instruction" as superclass. Within this class
there is a field called "Inst" (field bits<16> Inst;) which gets
assigned in classes which specifies a specific instruction format,
e.g. IForm contains:
  let Inst{12-15} = opcode;
  let Inst{7} = ad.Value;
  let Inst{6} = bw;
  let Inst{4-5} = as.Value;

From what I can see these values does not propagate to the files

generated by TableGen. I have tried removing the field and it is at
least still possible to run llc on a simple input file. This leads to
a couple of questions:
1. Is this field redundant or does it have some use which I have missed?
2. What is the status of the MSP430 backend? In a mail from 2012
(http://lists.ransford.org/pipermail/llvm-msp430/2012-February/000194.html)
Anton indicates that it is usable but is it a good basis for backend
studies?

My goal is to implement support for a new target and one step on the
way is to fully understand how one of the existing backends work.

Thanks
David

The Inst field is used to specify instruction encodings, which are then used to generate assemblers and disassemblers. I'm not sure offhand, but it's possible that the MSP430 backend doesn't make use of an auto-generated assembler.

--Owen

The Inst field is used to specify instruction encodings, which are then used to generate assemblers and disassemblers. I'm not sure offhand, but it's possible that the MSP430 backend doesn't make use of an auto-generated assembler.

Yes. On MSP430 there is only codegeneration, but still no assembler
parsing and disassembling.

Thanks for the explanation. I was expecting fields which are used by
non target specific code to be contained in the "Instruction" class in
"Target.td" (compare to e.g. DecoderMethod). Is it the need to support
different sizes which requires it to be created in the target specific
file? Is there any documentation available with regards to which
fields are available and what they do?

/ David