search for: readadcreg

Displaying 3 results from an estimated 3 matches for "readadcreg".

2010 Jan 04
0
[LLVMdev] 答复: 答复: [LLVMdev] How to bind a register variable with a given general purpose register?
or you can just add a built-in function in c frontend "readadcreg()" and emit it as llvm.zhu.readadcreg(), so you can just call the built-in function to get the adc register value. On 2010-1-4 21:27, Demon(Xiangyang) Zhu 朱向阳 wrote: > Hi Ether, > > Thank you very much. I will try it soon as your description. > > Regards > > _____________...
2010 Jan 04
5
[LLVMdev] How to bind a register variable with a given general purpose register?
Hi everyone, There are 16 GPRs in my RISC, but in fact GPR13 is read-only and connected to output of an A/D converter. It would be very convenient if i could bind a register variable with GPR13. Because i am a newbie i don't know how my llvm backend can support that. I plan to implement it as below. A. first declare a global variable in c-code int ADC asm("GPR13"); B. If
2010 Jan 04
0
[LLVMdev] 答复: [LLVMdev] How to bind a register variable with a given general purpose register?
...uot; i think you could: 1. add a attribute "GPR13"(or a more meaningful name like "adcreg") and the corresponding handler, so you code "int ADC asm("GPR13");" became "int ADC __attribute__((GPR13));" 2. add a intrinsic functions like "llvm.zhu.readadcreg()". 3. map any read to the variable marked with __attribute__((GPR13)) to llvm.zhu.readadcreg() instead of "load" instruction 4. assign gpr13 to a special register class like "gpr13class" instead of gprclass, so gpr13 will not be allocated as other gpr. 5. lower instrinisic...