I don't understand what you're doing here. You've completely removed EIJMP from gcc.
And you cannot hardcode an SEI in avr-libc. How do you know that interrupts were previously enabled? Typically SREG is saved, then CLI, atomic code, SREG restored. You can restore SREG before the final atomic instruction because interrupts are delayed. See datasheet and elsewhere in avr-libc where this is done. Eric Weddington > -----Original Message----- > From: Sean D'Epagnier [mailto:geckosena...@gmail.com] > Sent: Sunday, May 10, 2009 12:26 AM > To: Weddington, Eric > Cc: avr-gcc-list@nongnu.org; Anatoly Sokolov > Subject: Re: [avr-gcc-list] mcall-prologues completely broken > for >128k > > Hi, > > Here are some patches. Please take a look and tell me if what I did > with setjmp makes any sense. I don't really use longjmp so it's not > fully tested, and it is only to handle a case which is very difficult > to create. > > I have tested the gcc patch and my program is working very well now. > > There is still a major issue of what to do in bootloaders. It appears > that the trampolines do not get generated for bootloaders.. and how > can they? For bootloaders the compiler should use eijmp and eicall > and set EIND to the bootloader segment at startup. But what if > longjmp is used and what if application code is called? I'm not sure > what the best solution is here, but currently I'm just glad my > bootloader doesn't need indirect jumps. > > Sean > _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list