* libc/machine/sparc/setjmp.S (longjmp): Use register g1 instead of g6.
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 3304be6..8ad2461 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-15  Daniel Cederman  <cederman@gaisler.com>
+
+	* libc/machine/sparc/setjmp.S (longjmp): Use register g1 instead of g6.
+
 2014-05-14  Kaushik Phatak  <Kaushik.Phatak@kpit.com>
 
 	* libc/include/machine/ieeefp.h: Define _DOUBLE_IS_32BITS when double
diff --git a/newlib/libc/machine/sparc/setjmp.S b/newlib/libc/machine/sparc/setjmp.S
index bd879c4..8df0a6e 100644
--- a/newlib/libc/machine/sparc/setjmp.S
+++ b/newlib/libc/machine/sparc/setjmp.S
@@ -42,7 +42,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * from: $Header: /cvs/cvsfiles/devo/newlib/libc/machine/sparc/setjmp.S,v 1.1 1997/06/25 07:19:16 marka Exp $
+ * from: $Header$
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
@@ -124,9 +124,9 @@
 ENTRY(longjmp)
 ENTRY(_longjmp)
         ta      0x03            /* flush registers */
-        addcc   %o1, %g0, %g6   ! compute v ? v : 1 in a global register
+        addcc   %o1, %g0, %g1   ! compute v ? v : 1 in a global register
         be,a    0f
-        mov     1, %g6
+        mov     1, %g1
 0:
         ld      [%o0], %sp      /* caller's stack pointer */
 
@@ -143,6 +143,6 @@
         ld      [%o0+8], %fp    /* caller's frame pointer */
         ld      [%o0+12], %o7 
 
-        jmp     %o7 + 8         ! success, return %g6
-        mov     %g6, %o0
+        jmp     %o7 + 8         ! success, return %g1
+        mov     %g1, %o0