about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/sh/_mcount.S11
-rw-r--r--sysdeps/unix/sh/sysdep.S13
-rw-r--r--sysdeps/unix/sysv/linux/sh/sh3/setcontext.S3
-rw-r--r--sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S3
-rw-r--r--sysdeps/unix/sysv/linux/sh/sh4/setcontext.S1
-rw-r--r--sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S1
6 files changed, 26 insertions, 6 deletions
diff --git a/sysdeps/sh/_mcount.S b/sysdeps/sh/_mcount.S
index 7956c01256..7e3d50e94e 100644
--- a/sysdeps/sh/_mcount.S
+++ b/sysdeps/sh/_mcount.S
@@ -1,5 +1,5 @@
 /* Machine-specific calling sequence for `mcount' profiling function.  SuperH
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    Contributed by NIIBE Yutaka <gniibe@m17n.org>
    This file is part of the GNU C Library.
 
@@ -58,11 +58,20 @@ C_LABEL(_mcount)
 
 	/* Pop the saved registers.  */
 	lds.l	@r15+,pr
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (pr)
 	mov.l	@r15+,r7
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r7)
 	mov.l	@r15+,r6
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r6)
 	mov.l	@r15+,r5
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r5)
 	rts
 	 mov.l	@r15+,r4
+	/* Omit CFI for restore in delay slot.  */
 
 	.align 2
 #ifdef SHARED
diff --git a/sysdeps/unix/sh/sysdep.S b/sysdeps/unix/sh/sysdep.S
index e816575b03..f8025cc70c 100644
--- a/sysdeps/unix/sh/sysdep.S
+++ b/sysdeps/unix/sh/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -41,13 +41,15 @@ skip:
 	sts.l	pr, @-r15
 	cfi_adjust_cfa_offset (4)
 	cfi_rel_offset (pr, 0)
-	jsr	@r1
-	 mov.l	r0, @-r15
+	mov.l	r0, @-r15
 	cfi_adjust_cfa_offset (4)
+	jsr	@r1
+	 nop
 	mov.l	@r15+, r1
 	cfi_adjust_cfa_offset (-4)
 	lds.l	@r15+, pr
 	cfi_adjust_cfa_offset (-4)
+	cfi_restore (pr)
 	mov.l	r1, @r0
 #endif
 #else
@@ -77,10 +79,15 @@ skip:
 	jsr	@r1
 	 nop
 	lds.l	@r15+, pr
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (pr)
 	mov.l	@r15+, r1
+	cfi_adjust_cfa_offset (-4)
 	mov.l	r1, @r0
 #endif
 	mov.l	@r15+, r12
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r12)
 #endif
 	/* And just kick back a -1.  */
 	rts
diff --git a/sysdeps/unix/sysv/linux/sh/sh3/setcontext.S b/sysdeps/unix/sysv/linux/sh/sh3/setcontext.S
index abe384ef6b..9d672f9203 100644
--- a/sysdeps/unix/sysv/linux/sh/sh3/setcontext.S
+++ b/sysdeps/unix/sysv/linux/sh/sh3/setcontext.S
@@ -1,5 +1,5 @@
 /* Install given context.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -90,6 +90,7 @@ ENTRY(__setcontext)
 	mov.l	@(oR7,r0), r7
 	mov.l	@(oR8,r0), r8
 	mov.l	@r15+, r0
+	cfi_adjust_cfa_offset(-4)
 	jmp	@r0
 	 mov.l	@r15+, r0
 
diff --git a/sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S b/sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S
index 92c476efe7..8227a139e8 100644
--- a/sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S
@@ -1,5 +1,5 @@
 /* Save current context and install the given one.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -123,6 +123,7 @@ ENTRY(__swapcontext)
 	mov.l	@(oR7,r0), r7
 	mov.l	@(oR8,r0), r8
 	mov.l	@r15+, r0
+	cfi_adjust_cfa_offset(-4)
 	jmp	@r0
 	 mov.l	@r15+, r0
 	
diff --git a/sysdeps/unix/sysv/linux/sh/sh4/setcontext.S b/sysdeps/unix/sysv/linux/sh/sh4/setcontext.S
index a3c0e21e56..161c51d45d 100644
--- a/sysdeps/unix/sysv/linux/sh/sh4/setcontext.S
+++ b/sysdeps/unix/sysv/linux/sh/sh4/setcontext.S
@@ -132,6 +132,7 @@ ENTRY(__setcontext)
 	mov.l	@(oR7,r0), r7
 	mov.l	@(oR8,r0), r8
 	mov.l	@r15+, r0
+	cfi_adjust_cfa_offset(-4)
 	jmp	@r0
 	 mov.l	@r15+, r0
 
diff --git a/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S b/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S
index 3ff7fe420c..24caae5b64 100644
--- a/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S
@@ -209,6 +209,7 @@ ENTRY(__swapcontext)
 	mov.l	@(oR7,r0), r7
 	mov.l	@(oR8,r0), r8
 	mov.l	@r15+, r0
+	cfi_adjust_cfa_offset(-4)
 	jmp	@r0
 	 mov.l	@r15+, r0