Jan Kiszka wrote: > Philippe Gerum wrote: >> Jan Kiszka wrote: >>> Simplifies xirq trampoline and applies the xirq refactorings to >>> virq_handler too. >>> >> --- linux-2.6.23.12-xeno.orig/include/asm-i386/ipipe.h >> +++ linux-2.6.23.12-xeno/include/asm-i386/ipipe.h >> @@ -141,11 +141,7 @@ __ipipe_call_root_xirq_handler(unsigned >> "pushl %%ds\n\t" >> "pushl %%eax\n\t" >> "pushl %%ebp\n\t" >> - "pushl %%edi\n\t" >> - "pushl %%esi\n\t" >> - "pushl %%edx\n\t" >> - "pushl %%ecx\n\t" >> - "pushl %%ebx\n\t" >> + "subl $5*4,%%esp # rest can remain unsaved\n\t" >> >> This won't work. We actually want to save our regs, so that they are >> restored when going back to xirq_end through the iret path. If we don't >> save them, the registers will remain terminally clobbered. > > General purpose registers aren't stable across functions calls. But it > is a valid question what the compiler assumes due to the function > inlining here. So declaring those five clobbered should be safe enough - > but if you prefer to add a few extra cycles for safety, keep it as > explicit as it was :->. >
Declaring clobbers would duplicate what entry.S already does when restoring args from the interrupt frame. -- Philippe. _______________________________________________ Adeos-main mailing list [email protected] https://mail.gna.org/listinfo/adeos-main
