David Miller wrote: > This corrects the sparc64 setjmp implementation. > > We need to store the return address register, the > stack pointer, and frame pointer into the jump buf. > > And on longjmp we need restore those registers, flush the register > window state, and pull in the top-most register window. > > 2009-03-03 David S. Miller <da...@davemloft.net> > > * normal/sparc64/setjmp.S: Fix setjmp implementation. > * include/grub/sparc64/setjmp.h: Update grub_jmp_buf[]. > --- > include/grub/sparc64/setjmp.h | 3 +-- > normal/sparc64/setjmp.S | 18 +++++++++++++----- > 2 files changed, 14 insertions(+), 7 deletions(-) > > diff --git a/include/grub/sparc64/setjmp.h b/include/grub/sparc64/setjmp.h > index 12d8e01..183a820 100644 > --- a/include/grub/sparc64/setjmp.h > +++ b/include/grub/sparc64/setjmp.h > @@ -19,8 +19,7 @@ > #ifndef GRUB_SETJMP_CPU_HEADER > #define GRUB_SETJMP_CPU_HEADER 1 > > -/* FIXME (sparc64). */ > -typedef unsigned long grub_jmp_buf[20]; > +typedef unsigned long grub_jmp_buf[3];
I assume unsigned long is 64bit in sparc? Would it be more practical to use grub_uint64_t? Are there any other registers that needs to be preserved ? Other than that I cannot decipher more from that asm :). If you have tested it and it works. It probably ain't bad idea to commit this patch. _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel