[LLVMdev] Inst field in MSP430InstrFormats.td

Owen Anderson resistor at mac.com
Mon Jul 22 00:15:48 PDT 2013

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.


On Jul 21, 2013, at 4:19 PM, David Wiberg <dwiberg at gmail.com> wrote:

> 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
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list