[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/10]: Fix sparc64 setjmp
From: |
David Miller |
Subject: |
[PATCH 1/10]: Fix sparc64 setjmp |
Date: |
Wed, 04 Mar 2009 17:32:12 -0800 (PST) |
2009-03-03 David S. Miller <address@hidden>
* normal/sparc64/setjmp.S: Fix setjmp implementation.
* include/grub/sparc64/setjmp.h: Update grub_jmp_buf[].
---
include/grub/sparc64/setjmp.h | 7 ++++---
normal/sparc64/setjmp.S | 20 ++++++++++++++------
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/include/grub/sparc64/setjmp.h b/include/grub/sparc64/setjmp.h
index 12d8e01..c8abb12 100644
--- a/include/grub/sparc64/setjmp.h
+++ b/include/grub/sparc64/setjmp.h
@@ -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
@@ -19,8 +19,9 @@
#ifndef GRUB_SETJMP_CPU_HEADER
#define GRUB_SETJMP_CPU_HEADER 1
-/* FIXME (sparc64). */
-typedef unsigned long grub_jmp_buf[20];
+#include <grub/types.h>
+
+typedef grub_uint64_t grub_jmp_buf[3];
int grub_setjmp (grub_jmp_buf env);
void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
diff --git a/normal/sparc64/setjmp.S b/normal/sparc64/setjmp.S
index b1a9b6e..827299c 100644
--- a/normal/sparc64/setjmp.S
+++ b/normal/sparc64/setjmp.S
@@ -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
@@ -26,13 +26,21 @@
* int grub_setjmp (grub_jmp_buf env)
*/
FUNCTION(grub_setjmp)
- ret
- nop
+ stx %o7, [%o0 + 0x00]
+ stx %sp, [%o0 + 0x08]
+ retl
+ stx %fp, [%o0 + 0x10]
/*
* int grub_longjmp (grub_jmp_buf env, int val)
*/
FUNCTION(grub_longjmp)
- ret
- nop
-
+ ldx [%o0 + 0x10], %g1
+ movrz %o1, 1, %o1
+ ta 0x3
+ ldx [%o0 + 0x00], %o7
+ ldx [%o0 + 0x08], %fp
+ sub %fp, 192, %sp
+ stx %g1, [%sp + 2047 + (14 * 8)]
+ retl
+ restore %o1, 0, %o0
--
1.6.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 1/10]: Fix sparc64 setjmp,
David Miller <=