Re: [avr-gcc-list] How to tell avr-gcc not to use some registers in the whole program?

2009-02-21 Thread Georg-Johann Lay
Lin Nan schrieb: Hello, everyone! In my project, I need to bind four registers to two 16 bit pointers because the two pointers are used frequently. But I don't know exactly how to do it. Does anyone know something about it? You can do this by introducing two global register variables like

Re: [avr-gcc-list] How to tell avr-gcc not to use some registers in the whole program?

2009-02-21 Thread Parthasaradhi Nayani
--- On Sun, 2/22/09, Georg-Johann Lay a...@gjlay.de wrote: You can do this by introducing two global register variables like register foo_t * pfoo asm (r2); Also note the command line option -ffixed-2 -ffixed-3 that turn R2/R3 into fixed registers (in contrast to R2/R3 beeing