NewSoftSerial Library: An AFSoftSerial update

I just installed Arduino 0018 and NewSoftSerial10c on Fedora 12 (which uses avr-gcc 4.4.2). Simply including NewSoftSerial.h into an null sketch (ie void setup(){}/void loop(){}) causes the following error:

Error: register r24, r26, r28 or r30 required

Examining NewSoftSerial.cpp, I isolated the error to the following section (lines 174-186):

/* static */ 
inline void NewSoftSerial::tunedDelay(uint16_t delay) { 
  uint8_t tmp=0;

  asm volatile("sbiw    %0, 0x01 \n\t"
    "ldi %1, 0xFF \n\t"
    "cpi %A0, 0xFF \n\t"
    "cpc %B0, %1 \n\t"
    "brne .-10 \n\t"
    : "+r" (delay), "+a" (tmp)
    : "0" (delay)
    );
}

Using well-known AVR assembler web references, I note that the SBIW command can only be used on special register pairs, namely r24, r26, r28, r30. Consequently, it is necessary to tell the compiler to use only these registers for this operation. Changing the constraint used for the "delay" parameter from "+r" to "+w" does this. Consequently, the following causes the error to disappear:

/* static */ 
inline void NewSoftSerial::tunedDelay(uint16_t delay) { 
  uint8_t tmp=0;

  asm volatile("sbiw    %0, 0x01 \n\t"
    "ldi %1, 0xFF \n\t"
    "cpi %A0, 0xFF \n\t"
    "cpc %B0, %1 \n\t"
    "brne .-10 \n\t"
    : "+w" (delay), "+a" (tmp)
    : "0" (delay)
    );
}

Tests using this to communicate with a GPS module from a 328p Nano shows that it works great.

I am a newcomer to assembler and to Arduino, so I only raise this as a possible solution to this problem - I have no idea on the implications of this change for other processors.

Thanks for the great library.