summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/ChangeLog7
-rw-r--r--libc/assert/assert.h4
-rw-r--r--libc/libio/stdio.h7
-rw-r--r--libc/wcsmbs/uchar.h4
-rw-r--r--ports/ChangeLog.m68k29
-rw-r--r--ports/sysdeps/m68k/dl-trampoline.S62
-rw-r--r--ports/sysdeps/m68k/m680x0/add_n.S10
-rw-r--r--ports/sysdeps/m68k/m680x0/lshift.S25
-rw-r--r--ports/sysdeps/m68k/m680x0/m68020/addmul_1.S12
-rw-r--r--ports/sysdeps/m68k/m680x0/m68020/mul_1.S20
-rw-r--r--ports/sysdeps/m68k/m680x0/m68020/submul_1.S12
-rw-r--r--ports/sysdeps/m68k/m680x0/rshift.S25
-rw-r--r--ports/sysdeps/m68k/m680x0/sub_n.S10
-rw-r--r--ports/sysdeps/m68k/memchr.S35
-rw-r--r--ports/sysdeps/m68k/rawmemchr.S10
-rw-r--r--ports/sysdeps/m68k/strchr.S16
-rw-r--r--ports/sysdeps/m68k/strchrnul.S8
-rw-r--r--ports/sysdeps/m68k/sysdep.h14
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/clone.S17
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S10
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S10
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h6
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/semtimedop.S12
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/socket.S8
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/sysdep.S4
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/sysdep.h35
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/vfork.S6
27 files changed, 346 insertions, 72 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index f31cc94f7..da900aa60 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,3 +1,10 @@
+2012-01-06 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13566]
+ * assert/assert.h (static_assert): Don't define for C++.
+ * libio/stdio.h (gets): Do declare for C++ <= C++11.
+ * wcsmbs/uchar.h (char16_t, char32_t): Don't typedef for C++11.
+
2012-01-03 Ulrich Drepper <drepper@gmail.com>
* iconv/loop.c (single loop): Fix assertion in storing of
diff --git a/libc/assert/assert.h b/libc/assert/assert.h
index 4022e28b5..2e3e2b568 100644
--- a/libc/assert/assert.h
+++ b/libc/assert/assert.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003,2004,2007,2011
+/* Copyright (C) 1991,1992,1994-2001,2003,2004,2007,2011,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -115,7 +115,7 @@ __END_DECLS
#endif /* NDEBUG. */
-#ifdef __USE_ISOC11
+#if defined __USE_ISOC11 && !defined __cplusplus
/* Static assertion. Requires support in the compiler. */
# undef static_assert
# define static_assert _Static_assert
diff --git a/libc/libio/stdio.h b/libc/libio/stdio.h
index b39202879..d9cb573b6 100644
--- a/libc/libio/stdio.h
+++ b/libc/libio/stdio.h
@@ -1,5 +1,5 @@
/* Define ISO C stdio on top of C++ iostreams.
- Copyright (C) 1991, 1994-2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994-2011, 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
@@ -628,13 +628,16 @@ __BEGIN_NAMESPACE_STD
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
__wur;
-#ifndef __USE_ISOC11
+#if !defined __USE_ISOC11 \
+ || (defined __cplusplus && __cplusplus <= 201103L)
/* Get a newline-terminated string from stdin, removing the newline.
DO NOT USE THIS FUNCTION!! There is no limit on how much it will read.
The function has been officially removed in ISO C11. This opportunity
is used to also remove it from the GNU feature list. It is now only
available when explicitly using an old ISO C, Unix, or POSIX standard.
+ GCC defines _GNU_SOURCE when building C++ code and the function is still
+ in C++11, so it is also available for C++.
This function is a possible cancellation point and therefore not
marked with __THROW. */
diff --git a/libc/wcsmbs/uchar.h b/libc/wcsmbs/uchar.h
index bb5f3ba35..706b9a243 100644
--- a/libc/wcsmbs/uchar.h
+++ b/libc/wcsmbs/uchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011, 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
@@ -40,7 +40,7 @@ __END_NAMESPACE_C99
#endif
-#ifdef __GNUC__
+#if defined __GNUC__ && !defined __USE_ISOCXX11
/* Define the 16-bit and 32-bit character types. Use the information
provided by the compiler. */
# if !defined __CHAR16_TYPE__ || !defined __CHAR32_TYPE__
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index a234cfae6..8f62c7150 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,32 @@
+2012-01-05 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/dl-trampoline.S: Add cfi directives.
+ * sysdeps/m68k/memchr.S: Likewise.
+ * sysdeps/m68k/rawmemchr.S: Likewise.
+ * sysdeps/m68k/strchr.S: Likewise.
+ * sysdeps/m68k/strchrnul.S: Likewise.
+ * sysdeps/m68k/m680x0/add_n.S: Likewise.
+ * sysdeps/m68k/m680x0/lshift.S: Likewise.
+ * sysdeps/m68k/m680x0/rshift.S: Likewise.
+ * sysdeps/m68k/m680x0/sub_n.S: Likewise.
+ * sysdeps/m68k/m680x0/m68020/addmul_1.S: Likewise.
+ * sysdeps/m68k/m680x0/m68020/mul_1.S: Likewise.
+ * sysdeps/m68k/m680x0/m68020/submul_1.S: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/clone.S: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/semtimedop.S: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/socket.S: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/vfork.S: Likewise.
+ * sysdeps/m68k/sysdep.h (CALL_MCOUNT): Likewise.
+ (ENTRY): Add cfi_startproc.
+ (END): Add cfi_endproc.
+ * sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S: Remove
+ cfi_startproc/cfi_endproc.
+ * sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h (PSEUDO):
+ Likewise.
+
2011-12-23 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/m68k/bits/byteswap.h (__bswap_constant_64): Protect long
diff --git a/ports/sysdeps/m68k/dl-trampoline.S b/ports/sysdeps/m68k/dl-trampoline.S
index 99cdaab7d..c7e976166 100644
--- a/ports/sysdeps/m68k/dl-trampoline.S
+++ b/ports/sysdeps/m68k/dl-trampoline.S
@@ -1,5 +1,5 @@
/* PLT trampolines. m68k version.
- Copyright (C) 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2011, 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
@@ -23,54 +23,81 @@
.globl _dl_runtime_resolve
.type _dl_runtime_resolve, @function
_dl_runtime_resolve:
+ cfi_startproc
+ cfi_adjust_cfa_offset (8)
| Save %a0 (struct return address) and %a1.
move.l %a0, -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l %a1, -(%sp)
+ cfi_adjust_cfa_offset (4)
| Call the real address resolver.
jbsr _dl_fixup
| Restore register %a0 and %a1.
move.l (%sp)+, %a1
+ cfi_adjust_cfa_offset (-4)
move.l (%sp)+, %a0
+ cfi_adjust_cfa_offset (-4)
| Pop parameters
addq.l #8, %sp
+ cfi_adjust_cfa_offset (-8)
| Call real function.
#ifdef __mcoldfire__
move.l %d0,-(%sp)
+ cfi_adjust_cfa_offset (4)
rts
#else
jmp (%d0)
#endif
+ cfi_endproc
.size _dl_runtime_resolve, . - _dl_runtime_resolve
.text
.globl _dl_runtime_profile
.type _dl_runtime_profile, @function
_dl_runtime_profile:
+ cfi_startproc
+ cfi_adjust_cfa_offset (8)
pea 8(%sp)
+ cfi_adjust_cfa_offset (4)
move.l %a1, -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l %a0, -(%sp)
+ cfi_adjust_cfa_offset (4)
pea -1.w
+ cfi_adjust_cfa_offset (4)
| Push parameters for _dl_profile_fixup
pea (%sp)
+ cfi_adjust_cfa_offset (4)
pea 8(%sp)
+ cfi_adjust_cfa_offset (4)
move.l 32(%sp), -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l 32(%sp), -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l 32(%sp), -(%sp)
+ cfi_adjust_cfa_offset (4)
subq.l #8, %sp
+ cfi_adjust_cfa_offset (8)
| Call the real address resolver.
jbsr _dl_profile_fixup
| Pop parameters
lea 28(%sp), %sp
+ cfi_adjust_cfa_offset (-28)
move.l (%sp), %d1
jpl 1f
addq.l #4, %sp
+ cfi_adjust_cfa_offset (-4)
| Restore register %a0 and %a1.
move.l (%sp)+, %a0
+ cfi_adjust_cfa_offset (-4)
move.l (%sp)+, %a1
+ cfi_adjust_cfa_offset (-4)
lea 12(%sp), %sp
+ cfi_adjust_cfa_offset (-12)
| Call real function.
#ifdef __mcoldfire__
move.l %d0,-(%sp)
+ cfi_adjust_cfa_offset (4)
rts
#else
jmp (%d0)
@@ -85,7 +112,13 @@ _dl_runtime_profile:
+4 %a0
%sp free
*/
+#ifdef __mcoldfire__
+ cfi_adjust_cfa_offset (20)
+#else
+ cfi_adjust_cfa_offset (24)
+#endif
1: move.l %a2, (%sp)
+ cfi_rel_offset (%a2, 0)
move.l %sp, %a2
move.l %sp, %a0
lea 28(%sp), %a1
@@ -94,6 +127,7 @@ _dl_runtime_profile:
and.l #-3, %d1
sub.l %d1, %a0
move.l %a0, %sp
+ cfi_def_cfa_register (%a2)
#ifdef __mcoldfire__
tst.l %d1
beq 2f
@@ -129,7 +163,10 @@ _dl_runtime_profile:
jsr (%d0)
#endif
move.l %a2, %sp
+ cfi_def_cfa_register (%sp)
move.l (%sp)+, %a2
+ cfi_adjust_cfa_offset (4)
+ cfi_restore (%a2)
/*
+20 return address
+16 PLT1
@@ -140,38 +177,61 @@ _dl_runtime_profile:
*/
#if !defined (__mcoldfire__)
fmove.x %fp0, -(%sp)
+ cfi_adjust_cfa_offset (12)
#elif defined (__mcffpu__)
fmove.d %fp0, -(%sp)
+ cfi_adjust_cfa_offset (8)
#else
clr.l -(%sp)
clr.l -(%sp)
+ cfi_adjust_cfa_offset (8)
#endif
move.l %a0, -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l %d1, -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l %d0, -(%sp)
+ cfi_adjust_cfa_offset (4)
pea (%sp)
+ cfi_adjust_cfa_offset (4)
#ifdef __mcoldfire__
pea 24(%sp)
+ cfi_adjust_cfa_offset (4)
move.l 40(%sp), -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l 40(%sp), -(%sp)
+ cfi_adjust_cfa_offset (4)
#else
pea 28(%sp)
+ cfi_adjust_cfa_offset (4)
move.l 44(%sp), -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l 44(%sp), -(%sp)
+ cfi_adjust_cfa_offset (4)
#endif
jbsr _dl_call_pltexit
lea 16(%sp), %sp
+ cfi_adjust_cfa_offset (-16)
move.l (%sp)+, %d0
+ cfi_adjust_cfa_offset (-4)
move.l (%sp)+, %d1
+ cfi_adjust_cfa_offset (-4)
move.l (%sp)+, %a0
+ cfi_adjust_cfa_offset (-4)
#if !defined (__mcoldfire__)
fmove.x (%sp)+, %fp0
+ cfi_adjust_cfa_offset (-12)
lea 20(%sp), %sp
+ cfi_adjust_cfa_offset (-20)
#elif defined (__mcffpu__)
fmove.l (%sp)+, %fp0
+ cfi_adjust_cfa_offset (-8)
lea 20(%sp), %sp
+ cfi_adjust_cfa_offset (-20)
#else
lea 28(%sp), %sp
+ cfi_adjust_cfa_offset (-28)
#endif
rts
+ cfi_endproc
.size _dl_runtime_profile, . - _dl_runtime_profile
diff --git a/ports/sysdeps/m68k/m680x0/add_n.S b/ports/sysdeps/m68k/m680x0/add_n.S
index a9558491e..3011de6af 100644
--- a/ports/sysdeps/m68k/m680x0/add_n.S
+++ b/ports/sysdeps/m68k/m680x0/add_n.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
sum in a third limb vector.
-Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -35,7 +35,11 @@ MA 02111-1307, USA. */
ENTRY(__mpn_add_n)
/* Save used registers on the stack. */
movel R(d2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
movel R(a2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (R(d2), 4)
+ cfi_rel_offset (R(a2), 0)
/* Copy the arguments to registers. Better use movem? */
movel MEM_DISP(sp,12),R(a2)
@@ -70,7 +74,11 @@ L(L2:)
/* Restore used registers from stack frame. */
movel MEM_POSTINC(sp),R(a2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(a2))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
rts
END(__mpn_add_n)
diff --git a/ports/sysdeps/m68k/m680x0/lshift.S b/ports/sysdeps/m68k/m680x0/lshift.S
index 434b344bd..047241ff5 100644
--- a/ports/sysdeps/m68k/m680x0/lshift.S
+++ b/ports/sysdeps/m68k/m680x0/lshift.S
@@ -1,6 +1,6 @@
/* mc68020 __mpn_lshift -- Shift left a low-level natural-number integer.
-Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1996, 1998, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -40,6 +40,13 @@ ENTRY(__mpn_lshift)
/* Save used registers on the stack. */
moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (6*4)
+ cfi_rel_offset (R(d2), 0)
+ cfi_rel_offset (R(d3), 4)
+ cfi_rel_offset (R(d4), 8)
+ cfi_rel_offset (R(d5), 12)
+ cfi_rel_offset (R(d6), 16)
+ cfi_rel_offset (R(a2), 20)
/* Copy the arguments to registers. */
movel MEM_DISP(sp,28),R(res_ptr)
@@ -111,12 +118,21 @@ L(Lend:)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ cfi_remember_state
+ cfi_adjust_cfa_offset (-6*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
+ cfi_restore (R(d5))
+ cfi_restore (R(d6))
+ cfi_restore (R(a2))
rts
/* We loop from least significant end of the arrays, which is only
permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination. */
+ cfi_restore_state
L(Lspecial:)
clrl R(d0) /* initialize carry */
eorw #1,R(s_size)
@@ -143,5 +159,12 @@ L(LL1:)
L(LLend:)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ cfi_adjust_cfa_offset (-6*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
+ cfi_restore (R(d5))
+ cfi_restore (R(d6))
+ cfi_restore (R(a2))
rts
END(__mpn_lshift)
diff --git a/ports/sysdeps/m68k/m680x0/m68020/addmul_1.S b/ports/sysdeps/m68k/m680x0/m68020/addmul_1.S
index 05d1d8a80..478bff3dc 100644
--- a/ports/sysdeps/m68k/m680x0/m68020/addmul_1.S
+++ b/ports/sysdeps/m68k/m680x0/m68020/addmul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
the result to a second limb vector.
-Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -41,6 +41,11 @@ ENTRY(__mpn_addmul_1)
/* Save used registers on the stack. */
moveml R(d2)-R(d5),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4*4)
+ cfi_rel_offset (R(d2), 0)
+ cfi_rel_offset (R(d3), 4)
+ cfi_rel_offset (R(d4), 8)
+ cfi_rel_offset (R(d5), 12)
/* Copy the arguments to registers. Better use movem? */
movel MEM_DISP(sp,20),R(res_ptr)
@@ -75,6 +80,11 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d5)
+ cfi_adjust_cfa_offset (-4*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
+ cfi_restore (R(d5))
rts
END(__mpn_addmul_1)
diff --git a/ports/sysdeps/m68k/m680x0/m68020/mul_1.S b/ports/sysdeps/m68k/m680x0/m68020/mul_1.S
index f3e450ed9..6f6850021 100644
--- a/ports/sysdeps/m68k/m680x0/m68020/mul_1.S
+++ b/ports/sysdeps/m68k/m680x0/m68020/mul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store
the result in a second limb vector.
-Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -41,11 +41,10 @@ ENTRY(__mpn_mul_1)
/* Save used registers on the stack. */
moveml R(d2)-R(d4),MEM_PREDEC(sp)
-#if 0
- movel R(d2),MEM_PREDEC(sp)
- movel R(d3),MEM_PREDEC(sp)
- movel R(d4),MEM_PREDEC(sp)
-#endif
+ cfi_adjust_cfa_offset (3*4)
+ cfi_rel_offset (R(d2), 0)
+ cfi_rel_offset (R(d3), 4)
+ cfi_rel_offset (R(d4), 8)
/* Copy the arguments to registers. Better use movem? */
movel MEM_DISP(sp,16),R(res_ptr)
@@ -78,10 +77,9 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d4)
-#if 0
- movel MEM_POSTINC(sp),R(d4)
- movel MEM_POSTINC(sp),R(d3)
- movel MEM_POSTINC(sp),R(d2)
-#endif
+ cfi_adjust_cfa_offset (-3*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
rts
END(__mpn_mul_1)
diff --git a/ports/sysdeps/m68k/m680x0/m68020/submul_1.S b/ports/sysdeps/m68k/m680x0/m68020/submul_1.S
index 7522046b4..bc1fd3aa6 100644
--- a/ports/sysdeps/m68k/m680x0/m68020/submul_1.S
+++ b/ports/sysdeps/m68k/m680x0/m68020/submul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
the result from a second limb vector.
-Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -41,6 +41,11 @@ ENTRY(__mpn_submul_1)
/* Save used registers on the stack. */
moveml R(d2)-R(d5),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4*4)
+ cfi_rel_offset (R(d2), 0)
+ cfi_rel_offset (R(d3), 4)
+ cfi_rel_offset (R(d4), 8)
+ cfi_rel_offset (R(d5), 12)
/* Copy the arguments to registers. Better use movem? */
movel MEM_DISP(sp,20),R(res_ptr)
@@ -75,6 +80,11 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d5)
+ cfi_adjust_cfa_offset (-4*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
+ cfi_restore (R(d5))
rts
END(__mpn_submul_1)
diff --git a/ports/sysdeps/m68k/m680x0/rshift.S b/ports/sysdeps/m68k/m680x0/rshift.S
index 5e6abceb9..c6c720ae8 100644
--- a/ports/sysdeps/m68k/m680x0/rshift.S
+++ b/ports/sysdeps/m68k/m680x0/rshift.S
@@ -1,6 +1,6 @@
/* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer.
-Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1996, 1998, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -39,6 +39,13 @@ MA 02111-1307, USA. */
ENTRY(__mpn_rshift)
/* Save used registers on the stack. */
moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (6*4)
+ cfi_rel_offset (R(d2), 0)
+ cfi_rel_offset (R(d3), 4)
+ cfi_rel_offset (R(d4), 8)
+ cfi_rel_offset (R(d5), 12)
+ cfi_rel_offset (R(d6), 16)
+ cfi_rel_offset (R(a2), 20)
/* Copy the arguments to registers. */
movel MEM_DISP(sp,28),R(res_ptr)
@@ -100,12 +107,21 @@ L(Lend:)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ cfi_remember_state
+ cfi_adjust_cfa_offset (-6*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
+ cfi_restore (R(d5))
+ cfi_restore (R(d6))
+ cfi_restore (R(a2))
rts
/* We loop from most significant end of the arrays, which is only
permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination. */
+ cfi_restore_state
L(Lspecial:)
#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020))
lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr)
@@ -142,5 +158,12 @@ L(LL1:)
L(LLend:)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ cfi_adjust_cfa_offset (-6*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
+ cfi_restore (R(d5))
+ cfi_restore (R(d6))
+ cfi_restore (R(a2))
rts
END(__mpn_rshift)
diff --git a/ports/sysdeps/m68k/m680x0/sub_n.S b/ports/sysdeps/m68k/m680x0/sub_n.S
index 5833dd271..ab42743fe 100644
--- a/ports/sysdeps/m68k/m680x0/sub_n.S
+++ b/ports/sysdeps/m68k/m680x0/sub_n.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
store difference in a third limb vector.
-Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -35,7 +35,11 @@ MA 02111-1307, USA. */
ENTRY(__mpn_sub_n)
/* Save used registers on the stack. */
movel R(d2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
movel R(a2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (R(d2), 4)
+ cfi_rel_offset (R(a2), 0)
/* Copy the arguments to registers. Better use movem? */
movel MEM_DISP(sp,12),R(a2)
@@ -70,7 +74,11 @@ L(L2:)
/* Restore used registers from stack frame. */
movel MEM_POSTINC(sp),R(a2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(a2))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
rts
END(__mpn_sub_n)
diff --git a/ports/sysdeps/m68k/memchr.S b/ports/sysdeps/m68k/memchr.S
index 77e86a32b..e5c767759 100644
--- a/ports/sysdeps/m68k/memchr.S
+++ b/ports/sysdeps/m68k/memchr.S
@@ -1,7 +1,7 @@
/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the
first N bytes of STR.
For Motorola 68000.
- Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2003, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -28,10 +28,20 @@ ENTRY(__memchr)
/* Save the callee-saved registers we use. */
#ifdef __mcoldfire__
movel R(d2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
movel R(d3),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
movel R(d4),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (R(d2), 8)
+ cfi_rel_offset (R(d3), 4)
+ cfi_rel_offset (R(d4), 0)
#else
moveml R(d2)-R(d4),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (3*4)
+ cfi_rel_offset (R(d2), 0)
+ cfi_rel_offset (R(d3), 4)
+ cfi_rel_offset (R(d4), 8)
#endif
/* Get string pointer, character and length. */
@@ -234,13 +244,26 @@ L(L7:)
movel R(d0),R(a0)
#ifdef __mcoldfire__
movel MEM_POSTINC(sp),R(d4)
+ cfi_remember_state
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d4))
movel MEM_POSTINC(sp),R(d3)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d3))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
#else
moveml MEM_POSTINC(sp),R(d2)-R(d4)
+ cfi_remember_state
+ cfi_adjust_cfa_offset (-3*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
#endif
rts
+ cfi_restore_state
L(L8:)
/* We have a hit. Check to see which byte it was. First
compensate for the autoincrement in the loop. */
@@ -263,10 +286,20 @@ L(L9:)
movel R(a0),R(d0)
#ifdef __mcoldfire__
movel MEM_POSTINC(sp),R(d4)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d4))
movel MEM_POSTINC(sp),R(d3)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d3))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
#else
moveml MEM_POSTINC(sp),R(d2)-R(d4)
+ cfi_adjust_cfa_offset (-3*4)
+ cfi_restore (R(d2))
+ cfi_restore (R(d3))
+ cfi_restore (R(d4))
#endif
rts
END(__memchr)
diff --git a/ports/sysdeps/m68k/rawmemchr.S b/ports/sysdeps/m68k/rawmemchr.S
index 97735f669..dd446cf79 100644
--- a/ports/sysdeps/m68k/rawmemchr.S
+++ b/ports/sysdeps/m68k/rawmemchr.S
@@ -1,6 +1,6 @@
/* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For Motorola 68000.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -26,7 +26,11 @@
ENTRY(__rawmemchr)
/* Save the callee-saved registers we use. */
movel R(d2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
movel R(d3),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (R(d2), 4)
+ cfi_rel_offset (R(d3), 0)
/* Get string pointer and character. */
movel MEM_DISP(sp,12),R(a0)
@@ -182,7 +186,11 @@ L(L8:)
L(L9:)
movel R(a0),R(d0)
movel MEM_POSTINC(sp),R(d3)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d3))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
rts
END(__rawmemchr)
diff --git a/ports/sysdeps/m68k/strchr.S b/ports/sysdeps/m68k/strchr.S
index 2e1e3249f..6c6a08fe2 100644
--- a/ports/sysdeps/m68k/strchr.S
+++ b/ports/sysdeps/m68k/strchr.S
@@ -1,6 +1,6 @@
/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For Motorola 68000.
- Copyright (C) 1999, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -26,7 +26,11 @@
ENTRY(strchr)
/* Save the callee-saved registers we use. */
movel R(d2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
movel R(d3),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (R(d2),4)
+ cfi_rel_offset (R(d3),0)
/* Get string pointer and character. */
movel MEM_DISP(sp,12),R(a0)
@@ -227,9 +231,15 @@ L(L3:)
clrl R(d0)
movel R(d0),R(a0)
movel MEM_POSTINC(sp),R(d3)
+ cfi_remember_state
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d3))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
rts
+ cfi_restore_state
L(L8:)
/* We have a hit. Check to see which byte it was. First
compensate for the autoincrement in the loop. */
@@ -260,7 +270,11 @@ L(L8:)
L(L9:)
movel R(a0),R(d0)
movel MEM_POSTINC(sp),R(d3)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d3))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
rts
END(strchr)
diff --git a/ports/sysdeps/m68k/strchrnul.S b/ports/sysdeps/m68k/strchrnul.S
index 9d13ec16a..e31cb0c4d 100644
--- a/ports/sysdeps/m68k/strchrnul.S
+++ b/ports/sysdeps/m68k/strchrnul.S
@@ -27,7 +27,11 @@
ENTRY(__strchrnul)
/* Save the callee-saved registers we use. */
movel R(d2),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
movel R(d3),MEM_PREDEC(sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (R(d2), 4)
+ cfi_rel_offset (R(d3), 0)
/* Get string pointer and character. */
movel MEM_DISP(sp,12),R(a0)
@@ -253,7 +257,11 @@ L(L8:)
L(L9:)
movel R(a0),R(d0)
movel MEM_POSTINC(sp),R(d3)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d3))
movel MEM_POSTINC(sp),R(d2)
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (R(d2))
rts
END(__strchrnul)
diff --git a/ports/sysdeps/m68k/sysdep.h b/ports/sysdeps/m68k/sysdep.h
index ce70a0dfa..2b0e936bd 100644
--- a/ports/sysdeps/m68k/sysdep.h
+++ b/ports/sysdeps/m68k/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for m68k.
- Copyright (C) 1998, 2003, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2003, 2010, 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
@@ -54,10 +54,13 @@
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \
.align ALIGNARG(2); \
C_LABEL(name) \
+ cfi_startproc; \
CALL_MCOUNT
# undef END
-# define END(name) ASM_SIZE_DIRECTIVE(name)
+# define END(name) \
+ cfi_endproc; \
+ ASM_SIZE_DIRECTIVE(name)
/* If compiled for profiling, call `_mcount' at the start of each function. */
@@ -65,9 +68,12 @@
/* The mcount code relies on a normal frame pointer being on the stack
to locate our caller, so push one just for its benefit. */
# define CALL_MCOUNT \
- move.l %fp, -(%sp); move.l %sp, %fp; \
+ move.l %fp, -(%sp); \
+ cfi_adjust_cfa_offset (4); cfi_rel_offset (%fp, 0); \
+ move.l %sp, %fp; \
jbsr JUMPTARGET (mcount); \
- move.l (%sp)+, %fp;
+ move.l (%sp)+, %fp; \
+ cfi_adjust_cfa_offset (-4); cfi_restore (%fp);
# else
# define CALL_MCOUNT /* Do nothing. */
# endif
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/clone.S b/ports/sysdeps/unix/sysv/linux/m68k/clone.S
index 401e2ef3a..fa1b6b387 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,97,98,2002,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,2002,2010,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
@@ -52,22 +52,36 @@ ENTRY (__clone)
movel 12+0(%sp), %d1 /* get flags */
movel %d3, -(%a1) /* save %d3 and get parent_tidptr */
movel %d3, -(%sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (%d3, 0)
movel 20+4(%sp), %d3
movel %d4, -(%a1) /* save %d4 and get child_tidptr */
movel %d4, -(%sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (%d4, 0)
movel 28+8(%sp), %d4
movel %d5, -(%a1) /* save %d5 and get tls */
movel %d5, -(%sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (%d5, 0)
movel 24+12(%sp), %d5
/* save %d2 and get stack pointer */
#ifdef __mcoldfire__
movel %d2, -(%a1)
movel %d2, -(%sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (%d2, 0)
movel %a1, %d2
#else
exg %d2, %a1 /* save %d2 and get stack pointer */
+ cfi_register (%d2, %a1)
#endif
movel #SYS_ify (clone), %d0
+
+ /* End FDE now, because in the child the unwind info will be
+ wrong. */
+ cfi_endproc
+
trap #0
#ifdef __mcoldfire__
movel (%sp)+, %d2
@@ -115,6 +129,7 @@ donepid:
trap #0
cfi_endproc
+ cfi_startproc
PSEUDO_END (__clone)
weak_alias (__clone, clone)
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S
index 242d23d39..91f697bd8 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
@@ -41,12 +41,10 @@
.hidden __vdso_read_tp_stub
ENTRY (__vdso_read_tp_stub)
- cfi_startproc
move.l #__NR_get_thread_area, %d0
trap #0
move.l %d0, %a0
rts
- cfi_endproc
END (__vdso_read_tp_stub)
# ifdef SHARED
@@ -59,13 +57,11 @@ END (__vdso_read_tp_stub)
.hidden __m68k_read_tp
# endif
ENTRY (__m68k_read_tp)
- cfi_startproc
move.l #_GLOBAL_OFFSET_TABLE_@GOTPC, %a0
lea (-6, %pc, %a0), %a0
move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0
move.l (%a0), %a0
jmp (%a0)
- cfi_endproc
END (__m68k_read_tp)
/* The following two stubs are for macros in atomic.h, they can't
@@ -73,7 +69,6 @@ END (__m68k_read_tp)
.hidden __vdso_atomic_cmpxchg_32_stub
ENTRY (__vdso_atomic_cmpxchg_32_stub)
- cfi_startproc
move.l %d2, -(%sp)
cfi_adjust_cfa_offset (4)
cfi_rel_offset (%d2, 0)
@@ -84,12 +79,10 @@ ENTRY (__vdso_atomic_cmpxchg_32_stub)
cfi_adjust_cfa_offset (-4)
cfi_restore (%d2)
rts
- cfi_endproc
END (__vdso_atomic_cmpxchg_32_stub)
.hidden __vdso_atomic_barrier_stub
ENTRY (__vdso_atomic_barrier_stub)
- cfi_startproc
move.l %d0, -(%sp)
cfi_adjust_cfa_offset (4)
move.l #SYS_ify (atomic_barrier), %d0
@@ -97,7 +90,6 @@ ENTRY (__vdso_atomic_barrier_stub)
move.l (%sp)+, %d0
cfi_adjust_cfa_offset (-4)
rts
- cfi_endproc
END (__vdso_atomic_barrier_stub)
# else /* !SHARED */
/* If the vDSO is not available, use a syscall to get TP. */
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
index 83ce56423..46e117633 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
@@ -41,12 +41,10 @@
.hidden __vdso_read_tp_stub
ENTRY (__vdso_read_tp_stub)
- cfi_startproc
move.l #__NR_get_thread_area, %d0
trap #0
move.l %d0, %a0
rts
- cfi_endproc
END (__vdso_read_tp_stub)
# ifdef SHARED
@@ -59,11 +57,9 @@ END (__vdso_read_tp_stub)
.hidden __m68k_read_tp
# endif
ENTRY (__m68k_read_tp)
- cfi_startproc
lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a0
move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0
jmp ([%a0])
- cfi_endproc
END (__m68k_read_tp)
/* The following two stubs are for macros in atomic.h, they can't
@@ -71,7 +67,6 @@ END (__m68k_read_tp)
.hidden __vdso_atomic_cmpxchg_32_stub
ENTRY (__vdso_atomic_cmpxchg_32_stub)
- cfi_startproc
move.l %d2, -(%sp)
cfi_adjust_cfa_offset (4)
cfi_rel_offset (%d2, 0)
@@ -82,12 +77,10 @@ ENTRY (__vdso_atomic_cmpxchg_32_stub)
cfi_adjust_cfa_offset (-4)
cfi_restore (%d2)
rts
- cfi_endproc
END (__vdso_atomic_cmpxchg_32_stub)
.hidden __vdso_atomic_barrier_stub
ENTRY (__vdso_atomic_barrier_stub)
- cfi_startproc
move.l %d0, -(%sp)
cfi_adjust_cfa_offset (4)
move.l #SYS_ify (atomic_barrier), %d0
@@ -95,7 +88,6 @@ ENTRY (__vdso_atomic_barrier_stub)
move.l (%sp)+, %d0
cfi_adjust_cfa_offset (-4)
rts
- cfi_endproc
END (__vdso_atomic_barrier_stub)
# else /* !SHARED */
/* If the vDSO is not available, use a syscall to get TP. */
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
index 87e2d55ee..f52b0fe2d 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
@@ -40,7 +40,6 @@
rts; \
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
.Lpseudo_cancel: \
- cfi_startproc; \
CENABLE; \
DOCARGS_##args \
move.l %d0, -(%sp); /* Save result of CENABLE. */ \
@@ -54,8 +53,7 @@
move.l %d2, %d0; \
UNDOCARGS_##args \
cmp.l &-4095, %d0; \
- jcc SYSCALL_ERROR_LABEL; \
- cfi_endproc
+ jcc SYSCALL_ERROR_LABEL
/* Note: we use D2 to save syscall's return value as D0 will be clobbered in
CDISABLE. */
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/ports/sysdeps/unix/sysv/linux/m68k/semtimedop.S
index 2775c124c..9da88b90a 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/semtimedop.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/semtimedop.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@suse.de>, 2003.
@@ -34,7 +34,12 @@ ENTRY (semtimedop)
/* Save registers. */
move.l %d2, %a1
move.l %d3, -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l %d5, -(%sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_register (%d2, %a1)
+ cfi_rel_offset (%d3, 0)
+ cfi_rel_offset (%d5, 4)
move.l #SYSOP_semtimedop, %d1
move.l SEMID(%sp), %d2
@@ -47,8 +52,13 @@ ENTRY (semtimedop)
/* Restore registers. */
move.l (%sp)+, %d5
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (%d5)
move.l (%sp)+, %d3
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (%d3)
move.l %a1, %d2
+ cfi_restore (%d2)
/* Check for error. */
tst.l %d0
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/socket.S b/ports/sysdeps/unix/sysv/linux/m68k/socket.S
index 147a3b2d4..38aaa1719 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2010, 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
@@ -51,6 +51,7 @@ ENTRY (__socket)
/* Save registers. */
move.l %d2, %a0
+ cfi_register (%d2, %a0)
move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */
@@ -64,6 +65,7 @@ ENTRY (__socket)
/* Restore registers. */
move.l %a0, %d2
+ cfi_restore (%d2)
/* %d0 is < 0 if there was an error. */
tst.l %d0
@@ -73,8 +75,7 @@ ENTRY (__socket)
rts
#ifdef NEED_CANCELLATION
-1: cfi_startproc
- /* Enable asynchronous cancellation. */
+1: /* Enable asynchronous cancellation. */
CENABLE
/* Save D2. */
@@ -110,7 +111,6 @@ ENTRY (__socket)
/* %d0 is < 0 if there was an error. */
tst.l %d0
jmi SYSCALL_ERROR_LABEL
- cfi_endproc
/* Successful; return the syscall's value. */
rts
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/sysdep.S b/ports/sysdeps/unix/sysv/linux/m68k/sysdep.S
index e4ec92d83..2277aab6b 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2002, 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
@@ -37,8 +37,10 @@ ENTRY (__syscall_error)
move.l %d0, errno
#else
move.l %d0, -(%sp)
+ cfi_adjust_cfa_offset (4)
jbsr __errno_location
move.l (%sp)+, (%a0)
+ cfi_adjust_cfa_offset (-4)
#endif
move.l #-1, %d0
/* Copy return value to %a0 for syscalls that are declared to
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/sysdep.h b/ports/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 28113ac5c..1e2755493 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2010
+/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2010, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
@@ -116,10 +116,12 @@ SYSCALL_ERROR_LABEL: \
SYSCALL_ERROR_LABEL: \
neg.l %d0; \
move.l %d0, -(%sp); \
+ cfi_adjust_cfa_offset (4); \
jbsr __m68k_read_tp@PLTPC; \
SYSCALL_ERROR_LOAD_GOT (%a1); \
add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0; \
move.l (%sp)+, (%a0); \
+ cfi_adjust_cfa_offset (-4); \
move.l &-1, %d0; \
/* Copy return value to %a0 for syscalls that are declared to return \
a pointer (e.g., mmap). */ \
@@ -184,24 +186,35 @@ SYSCALL_ERROR_LABEL: \
#define UNDOARGS_1 UNDOARGS_0
#define DOARGS_2 _DOARGS_2 (8)
-#define _DOARGS_2(n) move.l %d2, %a0; move.l n(%sp), %d2; _DOARGS_1 (n-4)
-#define UNDOARGS_2 UNDOARGS_1; move.l %a0, %d2
+#define _DOARGS_2(n) move.l %d2, %a0; cfi_register (%d2, %a0); \
+ move.l n(%sp), %d2; _DOARGS_1 (n-4)
+#define UNDOARGS_2 UNDOARGS_1; move.l %a0, %d2; cfi_restore (%d2)
#define DOARGS_3 _DOARGS_3 (12)
-#define _DOARGS_3(n) move.l %d3, %a1; move.l n(%sp), %d3; _DOARGS_2 (n-4)
-#define UNDOARGS_3 UNDOARGS_2; move.l %a1, %d3
+#define _DOARGS_3(n) move.l %d3, %a1; cfi_register (%d3, %a1); \
+ move.l n(%sp), %d3; _DOARGS_2 (n-4)
+#define UNDOARGS_3 UNDOARGS_2; move.l %a1, %d3; cfi_restore (%d3)
#define DOARGS_4 _DOARGS_4 (16)
-#define _DOARGS_4(n) move.l %d4, -(%sp); move.l n+4(%sp), %d4; _DOARGS_3 (n)
-#define UNDOARGS_4 UNDOARGS_3; move.l (%sp)+, %d4
+#define _DOARGS_4(n) move.l %d4, -(%sp); \
+ cfi_adjust_cfa_offset (4); cfi_rel_offset (%d4, 0); \
+ move.l n+4(%sp), %d4; _DOARGS_3 (n)
+#define UNDOARGS_4 UNDOARGS_3; move.l (%sp)+, %d4; \
+ cfi_adjust_cfa_offset (-4); cfi_restore (%d4)
#define DOARGS_5 _DOARGS_5 (20)
-#define _DOARGS_5(n) move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n)
-#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5
+#define _DOARGS_5(n) move.l %d5, -(%sp); \
+ cfi_adjust_cfa_offset (4); cfi_rel_offset (%d5, 0); \
+ move.l n+4(%sp), %d5; _DOARGS_4 (n)
+#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5; \
+ cfi_adjust_cfa_offset (-4); cfi_restore (%d5)
#define DOARGS_6 _DOARGS_6 (24)
-#define _DOARGS_6(n) _DOARGS_5 (n-4); move.l %a0, -(%sp); move.l n+12(%sp), %a0;
-#define UNDOARGS_6 move.l (%sp)+, %a0; UNDOARGS_5
+#define _DOARGS_6(n) _DOARGS_5 (n-4); move.l %a0, -(%sp); \
+ cfi_adjust_cfa_offset (4); \
+ move.l n+12(%sp), %a0;
+#define UNDOARGS_6 move.l (%sp)+, %a0; cfi_adjust_cfa_offset (-4); \
+ UNDOARGS_5
#define ret rts
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/vfork.S b/ports/sysdeps/unix/sysv/linux/m68k/vfork.S
index 4def7e3b4..974730299 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002, 2003, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2003, 2010, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -46,6 +46,8 @@ ENTRY (__vfork)
/* Pop the return PC value into A0. */
movel %sp@+, %a0
+ cfi_adjust_cfa_offset (-4)
+ cfi_register (%pc, %a0)
/* Stuff the syscall number in D0 and trap into the kernel. */
movel #SYS_ify (vfork), %d0
@@ -62,6 +64,8 @@ ENTRY (__vfork)
.Lerror:
/* Push back the return PC. */
movel %a0,%sp@-
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (%pc, 0)
# ifdef __ASSUME_VFORK_SYSCALL
# ifndef PIC