[avr-libc-dev] [bug #26734] Unsafe SP register changes in ISR_NOBLOCK interrupt handlers

2012-11-16 Thread Eric Weddington
Update of bug #26734 (project avr-libc):

Priority:  5 - Normal = 9 - Immediate  


___

Reply to this item at:

  http://savannah.nongnu.org/bugs/?26734

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [bug #26734] Unsafe SP register changes in ISR_NOBLOCK interrupt handlers

2012-06-08 Thread Georg-Johann Lay
Follow-up Comment #2, bug #26734 (project avr-libc):

With avr-gcc 4.7.1 and higher, attribute interrupt will override attribute
signal, see

http://gcc.gnu.org/PR53256

and the GCC manual.

___

Reply to this item at:

  http://savannah.nongnu.org/bugs/?26734

___
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [bug #26734] Unsafe SP register changes in ISR_NOBLOCK interrupt handlers

2009-06-02 Thread Anatoly Sokolov

URL:
  http://savannah.nongnu.org/bugs/?26734

 Summary: Unsafe SP register changes in ISR_NOBLOCK interrupt
handlers
 Project: AVR C Runtime Library
Submitted by: aesok
Submitted on: Срд 03 Июн 2009 06:10:16
Category: Library
Severity: 5 - Blocker
Priority: 5 - Normal
  Item Group: Header files
  Status: None
Percent Complete: 0%
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Release: 1.6.6
   Fixed Release: None

___

Details:

Test case:
#include avr/interrupt.h
#include compat/deprecated.h

ISR(INT0_vect,ISR_NOBLOCK)
{
  volatile long long foo;
  
  foo = 1;
}

INTERRUPT(PCINT0_vect)
{
  volatile long long foo;
  
  foo = 1;
}

int main(void) 
{ 
  return 0;
}

For 'PCINT0_vect' interrupt handler correct code is generated:

INTERRUPT(PCINT0_vect)
{
  8c:   78 94   sei // enable interrupt

  //  Correct. interrupt is disabled/enabled when SP register is changed
  9e:   cd b7   in  r28, 0x3d   ; 61
  a0:   de b7   in  r29, 0x3e   ; 62
  a2:   28 97   sbiwr28, 0x08   ; 8
  a4:   f8 94   cli
  a6:   de bf   out 0x3e, r29   ; 62
  a8:   78 94   sei
  aa:   cd bf   out 0x3d, r28   ; 61

For 'INT0_vect' interrupt handler wrong code is generated:

ISR(INT0_vect,ISR_NOBLOCK)
{
  48:   78 94   sei // enable interrupt

  //  WRONG! NO interrupt is disabled/enabled when SP register is changed
  5a:   cd b7   in  r28, 0x3d   ; 61
  5c:   de b7   in  r29, 0x3e   ; 62
  5e:   28 97   sbiwr28, 0x08   ; 8
  60:   de bf   out 0x3e, r29   ; 62
  62:   cd bf   out 0x3d, r28   ; 61

Anatoly.




___

Reply to this item at:

  http://savannah.nongnu.org/bugs/?26734

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/



___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev