2007-11-20 Shaun Jackman * include/avr/boot.h (__boot_page_fill_normal, __boot_page_erase_normal, __boot_page_write_normal): Use the "z" register constraint. Index: include/avr/boot.h =================================================================== RCS file: /sources/avr-libc/avr-libc/include/avr/boot.h,v retrieving revision 1.26 diff -u -p -r1.26 boot.h --- include/avr/boot.h 23 Jan 2007 15:32:48 -0000 1.26 +++ include/avr/boot.h 20 Nov 2007 23:02:38 -0000 @@ -192,16 +192,15 @@ __asm__ __volatile__ \ ( \ "movw r0, %3\n\t" \ - "movw r30, %2\n\t" \ "sts %0, %1\n\t" \ "spm\n\t" \ "clr r1\n\t" \ : \ : "i" (_SFR_MEM_ADDR(__SPM_REG)), \ "r" ((uint8_t)__BOOT_PAGE_FILL), \ - "r" ((uint16_t)address), \ + "z" ((uint16_t)address), \ "r" ((uint16_t)data) \ - : "r0", "r30", "r31" \ + : "r0" \ ); \ }) @@ -249,14 +248,12 @@ ({ \ __asm__ __volatile__ \ ( \ - "movw r30, %2\n\t" \ "sts %0, %1\n\t" \ "spm\n\t" \ : \ : "i" (_SFR_MEM_ADDR(__SPM_REG)), \ "r" ((uint8_t)__BOOT_PAGE_ERASE), \ - "r" ((uint16_t)address) \ - : "r30", "r31" \ + "z" ((uint16_t)address) \ ); \ }) @@ -298,14 +295,12 @@ ({ \ __asm__ __volatile__ \ ( \ - "movw r30, %2\n\t" \ "sts %0, %1\n\t" \ "spm\n\t" \ : \ : "i" (_SFR_MEM_ADDR(__SPM_REG)), \ "r" ((uint8_t)__BOOT_PAGE_WRITE), \ - "r" ((uint16_t)address) \ - : "r30", "r31" \ + "z" ((uint16_t)address) \ ); \ })