
From: gerg@snapgear.com

Fix architecture/cpu defines to support those used by modern versions of
gcc (that is gcc > 3.3.x) for m68knommu.  The standard for defining
ColdFire architectures is no longer __mcf5200__, it is now __mcoldfire__. 
This patch fixes all the occurances in the m68knommu/lib functions.


---

 25-akpm/arch/m68knommu/lib/divsi3.S  |    4 ++--
 25-akpm/arch/m68knommu/lib/modsi3.S  |    2 +-
 25-akpm/arch/m68knommu/lib/mulsi3.S  |    2 +-
 25-akpm/arch/m68knommu/lib/udivsi3.S |    6 +++---
 25-akpm/arch/m68knommu/lib/umodsi3.S |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff -puN arch/m68knommu/lib/divsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire arch/m68knommu/lib/divsi3.S
--- 25/arch/m68knommu/lib/divsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire	2004-04-07 20:28:05.939212888 -0700
+++ 25-akpm/arch/m68knommu/lib/divsi3.S	2004-04-07 20:28:05.949211368 -0700
@@ -97,7 +97,7 @@ SYM (__divsi3):
 	movel	sp@(12), d1	/* d1 = divisor */
 	jpl	L1
 	negl	d1
-#ifndef __mcf5200__
+#if !(defined(__mcf5200__) || defined(__mcoldfire__))
 	negb	d2		/* change sign because divisor <0  */
 #else
 	negl	d2		/* change sign because divisor <0  */
@@ -105,7 +105,7 @@ SYM (__divsi3):
 L1:	movel	sp@(8), d0	/* d0 = dividend */
 	jpl	L2
 	negl	d0
-#ifndef __mcf5200__
+#if !(defined(__mcf5200__) || defined(__mcoldfire__))
 	negb	d2
 #else
 	negl	d2
diff -puN arch/m68knommu/lib/modsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire arch/m68knommu/lib/modsi3.S
--- 25/arch/m68knommu/lib/modsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire	2004-04-07 20:28:05.941212584 -0700
+++ 25-akpm/arch/m68knommu/lib/modsi3.S	2004-04-07 20:28:05.949211368 -0700
@@ -98,7 +98,7 @@ SYM (__modsi3):
 	jbsr	SYM (__divsi3)
 	addql	IMM (8), sp
 	movel	sp@(8), d1	/* d1 = divisor */
-#ifndef __mcf5200__
+#if !(defined(__mcf5200__) || defined(__mcoldfire__))
 	movel	d1, sp@-
 	movel	d0, sp@-
 	jbsr	SYM (__mulsi3)	/* d0 = (a/b)*b */
diff -puN arch/m68knommu/lib/mulsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire arch/m68knommu/lib/mulsi3.S
--- 25/arch/m68knommu/lib/mulsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire	2004-04-07 20:28:05.942212432 -0700
+++ 25-akpm/arch/m68knommu/lib/mulsi3.S	2004-04-07 20:28:05.949211368 -0700
@@ -95,7 +95,7 @@ SYM (__mulsi3):
 	muluw	sp@(10), d0	/* x0*y1 */
 	movew	sp@(6), d1	/* x1 -> d1 */
 	muluw	sp@(8), d1	/* x1*y0 */
-#ifndef __mcf5200__
+#if !(defined(__mcf5200__) || defined(__mcoldfire__))
 	addw	d1, d0
 #else
 	addl	d1, d0
diff -puN arch/m68knommu/lib/udivsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire arch/m68knommu/lib/udivsi3.S
--- 25/arch/m68knommu/lib/udivsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire	2004-04-07 20:28:05.943212280 -0700
+++ 25-akpm/arch/m68knommu/lib/udivsi3.S	2004-04-07 20:28:05.950211216 -0700
@@ -91,7 +91,7 @@ Boston, MA 02111-1307, USA.  */
 	.proc
 	.globl	SYM (__udivsi3)
 SYM (__udivsi3):
-#ifndef __mcf5200__
+#if !(defined(__mcf5200__) || defined(__mcoldfire__))
 	movel	d2, sp@-
 	movel	sp@(12), d1	/* d1 = divisor */
 	movel	sp@(8), d0	/* d0 = dividend */
@@ -136,7 +136,7 @@ L5:	subql	IMM (1), d0	/* adjust quotient
 L6:	movel	sp@+, d2
 	rts
 
-#else /* __mcf5200__ */
+#else /* __mcf5200__ || __mcoldfire__ */
 
 /* Coldfire implementation of non-restoring division algorithm from
    Hennessy & Patterson, Appendix A. */
@@ -158,5 +158,5 @@ L2:	subql	IMM (1),d4
 	moveml	sp@,d2-d4	| restore data registers
 	unlk	a6		| and return
 	rts
-#endif /* __mcf5200__ */
+#endif /* __mcf5200__ || __mcoldfire__ */
 
diff -puN arch/m68knommu/lib/umodsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire arch/m68knommu/lib/umodsi3.S
--- 25/arch/m68knommu/lib/umodsi3.S~fix-gcc-cpu-define-for-m68knommu-coldfire	2004-04-07 20:28:05.945211976 -0700
+++ 25-akpm/arch/m68knommu/lib/umodsi3.S	2004-04-07 20:28:05.950211216 -0700
@@ -98,7 +98,7 @@ SYM (__umodsi3):
 	jbsr	SYM (__udivsi3)
 	addql	IMM (8), sp
 	movel	sp@(8), d1	/* d1 = divisor */
-#ifndef __mcf5200__
+#if !(defined(__mcf5200__) || defined(__mcoldfire__))
 	movel	d1, sp@-
 	movel	d0, sp@-
 	jbsr	SYM (__mulsi3)	/* d0 = (a/b)*b */

_
