[llvm-dev] simple "InstrInfo.td" question
Matt Arsenault via llvm-dev
llvm-dev at lists.llvm.org
Fri Sep 25 20:57:30 PDT 2015
> On Sep 25, 2015, at 6:29 PM, Peter Lawrence via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
>
> 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!
Remove the parentheses around the operands. This should be (set i64:$dst), (add i16:$rs1, i16:$rs2)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150925/cb5db07e/attachment.html>
More information about the llvm-dev
mailing list