[LLVMdev] Emitting assembler code
Vladimir Prus
ghost at cs.msu.su
Tue Jun 8 01:05:04 PDT 2004
Chris Lattner wrote:
> > So the question is: how the information about format should be specified
> > in .td files? I've tried this:
> >
> > But the values of the TSFlags field for did not change.
>
> This one is definitely a tricky one. Take a look at the InstrInfo
> tablegen class (in lib/Target/Target.td) and specifically the
> TSFlagsFields and TSFlagsShifts lists. In the X86 backend these are
> implemented in X86.td.
>
> These specify exactly which fields of the Instruction classes should fill
> in which bits of the TSFlags field. The only gross thing is that you
> currently have to define a parallel enum or something to access these in
> C++ code. For the X86 backend, this enum is the one you've seen defined
> in X86InstrInfo.h
Thanks, this works perfectly!
- Volodya
More information about the llvm-dev
mailing list