[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patches] allow non-fpu m68k libraries



Richard Sandiford wrote:
Nathan Sidwell <nathan@xxxxxxxxxxxxxxxx> writes:

+	move.l #0, -(%sp)
+	move.l #0, -(%sp)

I suggest using clr.l here instead.

You don't pop the value in the non-FPU case.  It would probably be
easiest to fix that by bringing the following:

 	lea 20(%sp), %sp

fixed thusly, thanks. (I;ll commit this in the eglibc sources, once I have write access)

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk

Index: ChangeLog.csl
===================================================================
--- ChangeLog.csl	(revision 0)
+++ ChangeLog.csl	(revision 0)
@@ -0,0 +1,5 @@
+2007-03-27  Nathan Sidwell  <nathan@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/m68k/dl-trampoline.S: Use clr rather than move #0.  Pop
+	stack correctly in all cases.
+
Index: sysdeps/m68k/dl-trampoline.S
===================================================================
--- sysdeps/m68k/dl-trampoline.S	(revision 166890)
+++ sysdeps/m68k/dl-trampoline.S	(working copy)
@@ -143,8 +143,8 @@ _dl_runtime_profile:
 #elif defined (__mcffpu__)
 	fmove.l %fp0, -(%sp)
 #else
-	move.l #0, -(%sp)
-	move.l #0, -(%sp)
+	clr.l, -(%sp)
+	clr.l, -(%sp)
 #endif
 	move.l %a0, -(%sp)
 	move.l %d1, -(%sp)
@@ -166,9 +166,12 @@ _dl_runtime_profile:
 	move.l (%sp)+, %a0
 #if !defined (__mcoldfire__)
 	fmove.x (%sp)+, %fp0
+	lea 20(%sp), %sp
 #elif defined (__mcffpu__)
 	fmove.l (%sp)+, %fp0
-#endif
 	lea 20(%sp), %sp
+#elif
+	lea 28(%sp), %sp
+#endif
 	rts
 	.size _dl_runtime_profile, . - _dl_runtime_profile