<div dir="ltr"><font face="Tahoma" color="#000000" size="2">Hi everyone,</font></div>
<div dir="ltr"><font face="tahoma" size="2"></font> </div>
<div dir="ltr"><font face="tahoma" size="2">There are 16 GPRs in my RISC, but in fact GPR13 is read-only and connected to </font><font face="tahoma" size="2">output of </font><font face="tahoma" size="2">an A/D converter. </font></div>
<div dir="ltr"><font face="tahoma" size="2">It would be very convenient if i could bind a register variable with GPR13.</font></div>
<div dir="ltr"><font face="Tahoma" size="2"></font> </div>
<div dir="ltr"><font face="Tahoma" size="2">Because i am a newbie i don't know how my llvm backend can support that.</font></div>
<div dir="ltr"><font face="Tahoma" size="2"></font> </div>
<div dir="ltr"><font face="Tahoma" size="2">I plan to implement it as below.</font></div>
<div dir="ltr"><font face="Tahoma" size="2"></font> </div>
<div dir="ltr"><font face="Tahoma" size="2">A. first declare a global variable in c-code</font></div>
<div dir="ltr"><font face="Tahoma" size="2"> int ADC asm("GPR13"); </font></div>
<div dir="ltr"><font face="Tahoma" size="2">B. If backend finds a variable is loaded from "GPR13" use GPR13 instead.</font></div>
<div dir="ltr"><font face="Tahoma" size="2">C. backend can't allocate GPR13 to other variable</font></div>
<div dir="ltr"><font face="Tahoma" size="2"></font> </div>
<div dir="ltr">Is it a foolish method? Is there a better one? <font face="tahoma" size="2">Please give me some guidance</font></div>
<div dir="ltr"><font face="tahoma" size="2"></font> </div>
<div dir="ltr"><font face="tahoma" size="2">Thanks</font></div>