[llvm-dev] simple "InstrInfo.td" question
Peter Lawrence via llvm-dev
llvm-dev at lists.llvm.org
Fri Sep 25 18:29:54 PDT 2015
having trouble getting my "InstrInfo.td" file to build...
if I follow the example in MSP430, where they use RegisterClass in their [...] patterns
def DataRegs : RegisterClass<"Xmc", [i16], 16, (add R0, R1, R2, R3, R4, R5, R6, R7)>;
def ADD : FMT_R <0x4000, (outs datareg:$dst), (ins datareg:$rs1, datareg:$rs2),
"add $dst,$rs1,$rs2",
[(set (DataRegs:$dst), (add (DataRegs:$rs1), (DataRegs:$rs2)))]>;
then I get this error
[ 40%] Building XmcGenInstrInfo.inc...
ADD: Included from llvm-3.6.2.src/lib/Target/Xmc/Xmc.td:49:
llvm-3.6.2.src/lib/Target/Xmc/XmcInstrInfo.td:163:1: error: In ADD: Unrecognized node 'DataRegs'!
if I follow the example in Mips, where they use RegisterOperand in their [...] patterns
def datareg : RegisterOperand<DataRegs>;
def ADD : FMT_R <0x4000, (outs datareg:$dst), (ins datareg:$rs1, datareg:$rs2),
"add $dst,$rs1,$rs2",
[(set (datareg:$dst), (add (datareg:$rs1), (datareg:$rs2)))]>;
then I get this error
[ 40%] Building XmcGenInstrInfo.inc...
ADD: Included from llvm-3.6.2.src/lib/Target/Xmc/Xmc.td:49:
llvm-3.6.2.src/lib/Target/Xmc/XmcInstrInfo.td:163:1: error: In ADD: Unrecognized node 'datareg'!
if I follow the example of Sparc, where they use ValueType in their [...] patterns:
# def i16 : ValueType<16 , 3>; # see include "llvm/CodeGen/ValueTypes.td"
def ADD : FMT_R <0x4000, (outs datareg:$dst), (ins datareg:$rs1, datareg:$rs2),
"add $dst,$rs1,$rs2",
[(set (i16:$dst), (add (i16:$rs1), (i16:$rs2)))]>;
then I get this error
[ 40%] Building XmcGenInstrInfo.inc...
ADD: Included from llvm-3.6.2.src/lib/Target/Xmc/Xmc.td:49:
llvm-3.6.2.src/lib/Target/Xmc/XmcInstrInfo.td:163:1: error: In ADD: Type cast only takes one operand!
what am I missing ???
TIA,
Peter Lawrence.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150926/f8242c24/attachment-0001.html>
More information about the llvm-dev
mailing list