* grub-core/lib/powerpc/setjmp.S (grub_setjmp): Save r31.

(grub_longjmp): Restore r31.
	* include/grub/powerpc/setjmp.h (grub_jmp_buf): Reserve space for r31.
This commit is contained in:
Vladimir Serbinenko 2013-11-18 02:35:32 +01:00
parent 4336b5d85e
commit 59c943ecf6
3 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/powerpc/setjmp.S (grub_setjmp): Save r31.
(grub_longjmp): Restore r31.
* include/grub/powerpc/setjmp.h (grub_jmp_buf): Reserve space for r31.
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkrescue.c (make_image_fwdisk_abs): Insert all partmap * util/grub-mkrescue.c (make_image_fwdisk_abs): Insert all partmap

View file

@ -47,10 +47,11 @@ FUNCTION(grub_setjmp)
stw 28, 60(3) stw 28, 60(3)
stw 29, 64(3) stw 29, 64(3)
stw 30, 68(3) stw 30, 68(3)
stw 31, 72(3)
mflr 4 mflr 4
stw 4, 72(3)
mfcr 4
stw 4, 76(3) stw 4, 76(3)
mfcr 4
stw 4, 80(3)
li 3, 0 li 3, 0
blr blr
@ -76,9 +77,10 @@ FUNCTION(grub_longjmp)
lwz 28, 60(3) lwz 28, 60(3)
lwz 29, 64(3) lwz 29, 64(3)
lwz 30, 68(3) lwz 30, 68(3)
lwz 5, 72(3) lwz 31, 72(3)
mtlr 5
lwz 5, 76(3) lwz 5, 76(3)
mtlr 5
lwz 5, 80(3)
mtcr 5 mtcr 5
mr. 3, 4 mr. 3, 4
bne 1f bne 1f

View file

@ -19,7 +19,7 @@
#ifndef GRUB_SETJMP_CPU_HEADER #ifndef GRUB_SETJMP_CPU_HEADER
#define GRUB_SETJMP_CPU_HEADER 1 #define GRUB_SETJMP_CPU_HEADER 1
typedef unsigned long grub_jmp_buf[20]; typedef unsigned long grub_jmp_buf[21];
int grub_setjmp (grub_jmp_buf env) RETURNS_TWICE; int grub_setjmp (grub_jmp_buf env) RETURNS_TWICE;
void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn)); void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));