AVR: CLR in ISR corrupts SREG
Original Reporter info from Mantis: Timm Thaler
-
Reporter name: Timm Thaler
Original Reporter info from Mantis: Timm Thaler
- Reporter name: Timm Thaler
Description:
After fixing the R1 bug in the ISR ( https://bugs.freepascal.org/view.php?id=33165) entering the ISR will clr R1 bevor saving the SREG. As clr changes the SREG the SREG is corrupted and the program may fail.
push r1
push r0
clr r1
in r0,63
push r0
should be
push r1
push r0
in r0,63
push r0
clr r1
Mantis conversion info:
- Mantis ID: 33170
- OS: AVR
- OS Build: AVR5
- Build: FPC 3.1.1-r38235 [2018/02/13] fo
- Platform: Embedded
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 38241 (#311bcd4c)