[LLVMdev] Generate addi 40, r3 instruction
    Stavropoulos Nikos 
    n.stavropoulos at think-silicon.com
       
    Fri Apr  5 07:30:57 PDT 2013
    
    
  
>def ADDI : F1<opcode, (outs IntRegs:$dst), (ins IntRegs:$dst, i32imm:$imm) 
>                      "addi $imm, $dst", 
>                      [(set $IntRegs:$dst, (add $IntRegs:$dst, i32imm:$c))] 
 
when we give an immediate in the string we give the same name so in the
third line use imm instead of c
in the third line we do not put $ prefix in front of Register class so your
third line should be 
                     [(set IntRegs:$dst, (add IntRegs:$dst, i32imm:$imm))] 
--
View this message in context: http://llvm.1065342.n5.nabble.com/Generate-addi-40-r3-instruction-tp56489p56492.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
    
    
More information about the llvm-dev
mailing list