aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-11-18 01:07:22 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2012-11-18 01:22:38 +0100
commit67f2b51c62cb0367e30f26a8865d77fc6461bdb3 (patch)
tree34531c24a56c4c529abd6837c1063f3d0a7935bc /ports
parente510ab5efff3450b723dbe71734e8b22be14d1c6 (diff)
downloadglibc-67f2b51c62cb0367e30f26a8865d77fc6461bdb3.zip
glibc-67f2b51c62cb0367e30f26a8865d77fc6461bdb3.tar.gz
glibc-67f2b51c62cb0367e30f26a8865d77fc6461bdb3.tar.bz2
m68k: fix cancellable syscall with 5 or 6 arguments
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.m68k5
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h10
2 files changed, 10 insertions, 5 deletions
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index de759b8..d609e27 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2012-11-18 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h (_DOCARGS_5)
+ (UNDOCARGS_5): Save %d5 on stack instead of in %a1.
+
2012-11-15 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/m68k/dl-machine.h (ELF_MACHINE_RUNTIME_FIXUP_PARAMS):
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 249e0e2..e295898 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
@@ -69,8 +69,6 @@
# define _DOCARGS_2(n) DOCARGS_0 move.l n+4(%sp), %d2; _DOCARGS_1 (n)
# define UNDOCARGS_2 UNDOCARGS_0
-/* TODO: We can optimize DOCARGS_{3, 4} by saving registers to a0 and a1
- instead of pushing them on stack. */
# define DOCARGS_3 _DOCARGS_3 (12)
# define _DOCARGS_3(n) move.l %d3, -(%sp); \
cfi_adjust_cfa_offset (4); cfi_rel_offset (%d3, 0); \
@@ -86,9 +84,11 @@
cfi_adjust_cfa_offset (-4); cfi_restore (%d4);
# define DOCARGS_5 _DOCARGS_5 (20)
-# define _DOCARGS_5(n) move.l %d5, %a1; cfi_register (%d5, a1); \
- move.l n(%sp), %d5; _DOCARGS_4 (n-4)
-# define UNDOCARGS_5 UNDOCARGS_4 move.l %a1, %d5; cfi_restore (%d5);
+# define _DOCARGS_5(n) move.l %d5, -(%sp); \
+ cfi_adjust_cfa_offset (4); cfi_rel_offset (%d5, 0); \
+ move.l n+4(%sp), %d5; _DOCARGS_4 (n)
+# define UNDOCARGS_5 UNDOCARGS_4 move.l (%sp)+, %d5; \
+ cfi_adjust_cfa_offset (-4); cfi_restore (%d5);
# define DOCARGS_6 _DOCARGS_6 (24)
# define _DOCARGS_6(n) move.l n(%sp), %a0; _DOCARGS_5 (n-4)