We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello! In one of my applications i need to copy value of a register in a C variable. Because I work with a LM3S811 I cannot use inline assembler (because it is not permitted when generating Thumb code), and the only solution (I guess) is to use " Named register variables". The problem is that in any situation returned value is the value of register r0.
int reg6(void) { register int reg __asm("r6"); return reg; }
For example this function return the value of register r0. Somebody can tell my why? There is another solution?