Hi,<br><br>I am facing an issue with tablegen. <br><br>tablegen complains about not finding a register when % is used in the instruction string. <br>error: unable to find register for '' (which matches register prefix)<br>


<br>I have copied an example (not the original). Note that i added %prefix_ before $sp register. Tablegen seems to interpret % as placeholder for inserting register. Is there any way to make tablgen ignore the %? I have tried '\' character, and two "%%". None worked. <br>


<br>// ADD <Rd>, sp, #<imm8><br>// This is rematerializable, which is particularly useful for taking the<br>// address of locals.<br>let isReMaterializable = 1 in<br>def tADDrSPi : T1I<(outs tGPR:$dst), (ins GPR:$sp, t_imm_s4:$rhs), IIC_iALUi,<br>


                   "add\t$dst, %prefix_$sp, $rhs", []>,<br>               T1Encoding<{1,0,1,0,1,?}> {<br>  // A6.2 & A8.6.8<br>  bits<3> dst;<br>  bits<8> rhs;<br>  let Inst{10-8} = dst;<br>


  let Inst{7-0}  = rhs;<br>}<br><br><br>- Khaled<br>