[LLVMdev] HELP - tblgen -gen-asm-matcher restrictions on .td content
Carter, Jack
jcarter at mips.com
Wed Jan 25 18:45:05 PST 2012
I'm trying to generate MipsGenAsmMatcher.inc for MipsAsmParser.cpp.
What added restrictions for the .td file contents are there for tblgen -gen-asm-matcher?
For the Mips platform we create the following .inc files through tblgen.
tablegen(LLVM MipsGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM MipsGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM MipsGenCodeEmitter.inc -gen-emitter)
tablegen(LLVM MipsGenMCCodeEmitter.inc -gen-emitter -mc-emitter)
tablegen(LLVM MipsGenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM MipsGenDAGISel.inc -gen-dag-isel)
tablegen(LLVM MipsGenCallingConv.inc -gen-callingconv)
tablegen(LLVM MipsGenSubtargetInfo.inc -gen-subtarget)
add_public_tablegen_target(MipsCommonTableGen)
When I started trying to generate MipsGenAsmMatcher.inc for the assembler I started getting errors.
tblgen -gen-asm-matcher -I ~/workarea/asm/llvm/include/ Mips.tdIncluded from Mips.td:24:
MipsInstrInfo.td:833:14: error: Instruction 'LWL' has no tokens
defm LWL : LoadUnAlign32<0x22>;
How does it get a token?
Commenting out this code I got farther and found that a register that didn't have a formal def in MipsRegisterInfo.td would get flagged.
!strconcat(instr_asm, "\t$$zero, $rs, $rt"),
% tblgen -gen-asm-matcher -I ~/workarea/asm/llvm/include/ Mips.td
Included from Mips.td:24:
Included from MipsInstrInfo.td:1120:
Mips64InstrInfo.td:173:1: error: error: unable to find operand: 'zero'
def DSDIV : Div64<MipsDivRem, 0x1e, "ddiv", IIIdiv>;
^
Any information on this would be great.
Cheers,
Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120126/26783d6b/attachment.html>
More information about the llvm-dev
mailing list