about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sh/sysdep.h
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-06-23 12:11:13 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-06-23 12:11:13 +0200
commit58f902b8d8cd47e8f4f2fcd64721a6289400422e (patch)
tree277378f362df2bfad4fd4b8758136a69bb05b267 /sysdeps/unix/sysv/linux/sh/sysdep.h
parent1518f58b6120289e69aeba9426eca9234cd9a200 (diff)
downloadglibc-58f902b8d8cd47e8f4f2fcd64721a6289400422e.tar.gz
glibc-58f902b8d8cd47e8f4f2fcd64721a6289400422e.tar.xz
glibc-58f902b8d8cd47e8f4f2fcd64721a6289400422e.zip
SH: Preserve more registers for frame unwinding purposes, add CFI directives.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sh/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/sh/sysdep.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index 5215a845d9..ce72c66a77 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992,1993,1995-2000,2002-2006,2009,2011
-	Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>.
@@ -100,11 +99,15 @@
 # if RTLD_PRIVATE_ERRNO
 #  define SYSCALL_ERROR_HANDLER	\
 	neg r0,r1; \
+	mov r12,r2; \
+	cfi_register (r12, r2); \
 	mov.l 0f,r12; \
 	mova 0f,r0; \
 	add r0,r12; \
 	mov.l 1f,r0; \
 	mov.l r1,@(r0,r12); \
+	mov r2,r12; \
+	cfi_restore (r12); \
 	bra .Lpseudo_end; \
 	 mov _IMM1,r0; \
 	.align 2; \
@@ -121,6 +124,7 @@
 #  define SYSCALL_ERROR_HANDLER \
 	neg r0,r1; \
 	mov r12,r2; \
+	cfi_register (r12, r2); \
 	mov.l 0f,r12; \
 	mova 0f,r0; \
 	add r0,r12; \
@@ -128,6 +132,7 @@
 	stc gbr, r4; \
 	mov.l @(r0,r12),r0; \
 	mov r2,r12; \
+	cfi_restore (r12); \
 	add r4,r0; \
 	mov.l r1,@r0; \
 	bra .Lpseudo_end; \
@@ -140,12 +145,14 @@
 #  define SYSCALL_ERROR_HANDLER						      \
 	neg r0,r1; \
 	mov r12,r2; \
+	cfi_register (r12, r2); \
 	mov.l 0f,r12; \
 	mova 0f,r0; \
 	add r0,r12; \
 	mov.l 1f,r0; \
 	mov.l @(r0,r12),r0; \
 	mov r2,r12; \
+	cfi_restore (r12); \
 	mov.l r1,@r0; \
 	bra .Lpseudo_end; \
 	 mov _IMM1,r0; \