aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-06-30 21:36:59 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-30 21:36:59 +0000
commitc53e2f0a560a54fe1307233dffd002bdb6fb20d0 (patch)
treee45e0469471aeeb43129467b1edc0fc87277b83c /ports
parent8145005c31149415162ff9b83e96d676557a1319 (diff)
downloadglibc-c53e2f0a560a54fe1307233dffd002bdb6fb20d0.tar
glibc-c53e2f0a560a54fe1307233dffd002bdb6fb20d0.tar.gz
glibc-c53e2f0a560a54fe1307233dffd002bdb6fb20d0.tar.bz2
glibc-c53e2f0a560a54fe1307233dffd002bdb6fb20d0.zip
Support no-FPU ColdFire in sysdeps/m68k/dl-trampoline.S and refactor code.
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.m68k8
-rw-r--r--ports/sysdeps/m68k/dl-trampoline.S43
2 files changed, 27 insertions, 24 deletions
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index 307665cbb4..c96bbdee50 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,11 @@
+2013-06-30 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/m68k/dl-trampoline.S (FMOVE): Define conditional on
+ [__mcoldfire__] and [__mcffpu__].
+ (FPSPACE): Likewise.
+ (_dl_runtime_profile): Save and restore %fp0 with FMOVE, only if
+ [FMOVE]. Use FPSPACE in stack offsets.
+
2013-06-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/m68k/fpu_control.h: Fix preprocessor indentation.
diff --git a/ports/sysdeps/m68k/dl-trampoline.S b/ports/sysdeps/m68k/dl-trampoline.S
index 5aeafc719e..a4caa67a82 100644
--- a/ports/sysdeps/m68k/dl-trampoline.S
+++ b/ports/sysdeps/m68k/dl-trampoline.S
@@ -18,6 +18,16 @@
#include <sysdep.h>
+#if !defined (__mcoldfire__)
+# define FMOVE fmove.x
+# define FPSPACE 12
+#elif defined (__mcffpu__)
+# define FMOVE fmove.d
+# define FPSPACE 8
+#else
+# define FPSPACE 0
+#endif
+
.text
.globl _dl_runtime_resolve
.type _dl_runtime_resolve, @function
@@ -174,12 +184,9 @@ _dl_runtime_profile:
+4 %a1
%sp %a0
*/
-#ifdef __mcoldfire__
- fmove.d %fp0, -(%sp)
- cfi_adjust_cfa_offset (8)
-#else
- fmove.x %fp0, -(%sp)
- cfi_adjust_cfa_offset (12)
+#ifdef FMOVE
+ FMOVE %fp0, -(%sp)
+ cfi_adjust_cfa_offset (FPSPACE)
#endif
move.l %a0, -(%sp)
cfi_adjust_cfa_offset (4)
@@ -189,21 +196,12 @@ _dl_runtime_profile:
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)
+ pea (16+FPSPACE)(%sp)
cfi_adjust_cfa_offset (4)
- move.l 40(%sp), -(%sp)
+ move.l (32+FPSPACE)(%sp), -(%sp)
cfi_adjust_cfa_offset (4)
-#else
- pea 28(%sp)
- cfi_adjust_cfa_offset (4)
- move.l 44(%sp), -(%sp)
+ move.l (32+FPSPACE)(%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)
@@ -213,12 +211,9 @@ _dl_runtime_profile:
cfi_adjust_cfa_offset (-4)
move.l (%sp)+, %a0
cfi_adjust_cfa_offset (-4)
-#ifdef __mcoldfire__
- fmove.d (%sp)+, %fp0
- cfi_adjust_cfa_offset (-8)
-#else
- fmove.x (%sp)+, %fp0
- cfi_adjust_cfa_offset (-12)
+#ifdef FMOVE
+ FMOVE (%sp)+, %fp0
+ cfi_adjust_cfa_offset (-FPSPACE)
#endif
lea 20(%sp), %sp
cfi_adjust_cfa_offset (-20)