]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-04-01 David S. Miller <davem@davemloft.net>
authorrobertmh <robertmh@localhost>
Wed, 1 Apr 2009 13:01:05 +0000 (13:01 +0000)
committerrobertmh <robertmh@localhost>
Wed, 1 Apr 2009 13:01:05 +0000 (13:01 +0000)
* normal/sparc64/setjmp.S: Fix setjmp implementation.
* include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
(grub_setjmp): Mark with 'returns_twice' attribute.
* include/grub/i386/setjmp.h (grub_setjmp): Likewise
* include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
* include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.

ChangeLog
include/grub/i386/setjmp.h
include/grub/powerpc/setjmp.h
include/grub/sparc64/setjmp.h
include/grub/x86_64/setjmp.h
normal/sparc64/setjmp.S

index cfd60707dcd3dc15bce2bf3544abc52da8d78410..46996817655661dd75f7b08a15d8852c76e80cdc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-04-01  David S. Miller  <davem@davemloft.net>
+
+       * normal/sparc64/setjmp.S: Fix setjmp implementation.
+       * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.  
+       (grub_setjmp): Mark with 'returns_twice' attribute.
+       * include/grub/i386/setjmp.h (grub_setjmp): Likewise
+       * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
+       * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
+
 2009-04-01  Robert Millan  <rmh@aybabtu.com>
 
        Reapply fix from 2008-07-28 which was accidentally reverted; also
index 02b0d8fe00fcbaacc955043ac8ec33a3b2abb8fb..c5f94b40654626523198642fae5024057fe88796 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2003,2006,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2003,2006,2007,2009  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -21,7 +21,8 @@
 
 typedef unsigned long grub_jmp_buf[6];
 
-int grub_setjmp (grub_jmp_buf env) __attribute__ ((cdecl, regparm (3)));
+int grub_setjmp (grub_jmp_buf env) __attribute__ ((returns_twice, cdecl,
+                                                  regparm (3)));
 void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn, cdecl,
                                                              regparm (3)));
 
index 441e53883b09951911ccb673bfffeaf97c5fc7d9..fa16f73d253fd6420bd1570178a1be716e417f54 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2004,2006,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2002,2004,2006,2007,2009  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 
 typedef unsigned long grub_jmp_buf[20];
 
-int grub_setjmp (grub_jmp_buf env);
+int grub_setjmp (grub_jmp_buf env) __attribute__ ((returns_twice));
 void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
 
 #endif /* ! GRUB_SETJMP_CPU_HEADER */
index 12d8e015f9ab96bfee4d57f6ef6e377fb34766c7..6096baef18b253c56898e9ac166a8ff480558d13 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2004,2006,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2002,2004,2006,2007,2009  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
 #ifndef GRUB_SETJMP_CPU_HEADER
 #define GRUB_SETJMP_CPU_HEADER 1
 
-/* FIXME (sparc64).  */
-typedef unsigned long grub_jmp_buf[20];
+#include <grub/types.h>
 
-int grub_setjmp (grub_jmp_buf env);
+typedef grub_uint64_t grub_jmp_buf[3];
+
+int grub_setjmp (grub_jmp_buf env) __attribute__ ((returns_twice));
 void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
 
 #endif /* ! GRUB_SETJMP_CPU_HEADER */
index e417f65b7f5cc360ede92f192501cc9eefb1dc02..4ad968ed567e51cf1ada9fcea05904e208635ed0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2003,2006,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2003,2006,2007,2009  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 
 typedef unsigned long grub_jmp_buf[8];
 
-int grub_setjmp (grub_jmp_buf env);
+int grub_setjmp (grub_jmp_buf env) __attribute__ ((returns_twice));
 void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
 
 #endif /* ! GRUB_SETJMP_CPU_HEADER */
index b1a9b6eefcf8aa6171cffc430d7bd5d8a868867a..0e23ecfa15262629706cd5851c3e3cbfc637151f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2005,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2005,2007,2009  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  * int grub_setjmp (grub_jmp_buf env)
  */
 FUNCTION(grub_setjmp)
-        ret
-         nop
+       stx     %o7, [%o0 + 0x00]
+       stx     %sp, [%o0 + 0x08]
+       stx     %fp, [%o0 + 0x10]
+       retl
+        clr    %o0
 
 /*
  * int grub_longjmp (grub_jmp_buf env, int val)
  */
 FUNCTION(grub_longjmp)
-        ret
-         nop
-
+       ldx     [%o0 + 0x10], %g1
+       movrz   %o1, 1, %o1
+       flushw
+       ldx     [%o0 + 0x00], %o7
+       ldx     [%o0 + 0x08], %fp
+       sub     %fp, 192, %sp
+       stx     %g1, [%sp + 2047 + (14 * 8)]
+       retl
+        restore %o1, 0, %o0