It is very likely that you will get reload failures because gcc sometimes needs three pointer registers, but you could try to use the -ffixed option for marking X to be a "fixed" register. The failure would show up at compile time when gcc complains that there are not enough registers in class "pointer regs" available.
IIRC also the boot sequence will still use the X register. Also eeprom support in avr-libc will no longer work. Only safe register to be marked as "fixed" is r2 ... r7, IIRC. Bjoern. -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Ram Kumar Rengaswamy Gesendet: Donnerstag, 20. Oktober 2005 10:51 An: [email protected] Betreff: [avr-gcc-list] Register Usage Hi, I am interested in compiling a C code for ATMega128 such that it never uses the register pair X (R27:R26). Could someone direct me as to how I could go about doing it with avr-gcc. Thanks, -Ram _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
