Commit 0cd04dcb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] m68knommu/coldfire: fix gcc cpu define

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.
parent 8f9c1be7
...@@ -97,7 +97,7 @@ SYM (__divsi3): ...@@ -97,7 +97,7 @@ SYM (__divsi3):
movel sp@(12), d1 /* d1 = divisor */ movel sp@(12), d1 /* d1 = divisor */
jpl L1 jpl L1
negl d1 negl d1
#ifndef __mcf5200__ #if !(defined(__mcf5200__) || defined(__mcoldfire__))
negb d2 /* change sign because divisor <0 */ negb d2 /* change sign because divisor <0 */
#else #else
negl d2 /* change sign because divisor <0 */ negl d2 /* change sign because divisor <0 */
...@@ -105,7 +105,7 @@ SYM (__divsi3): ...@@ -105,7 +105,7 @@ SYM (__divsi3):
L1: movel sp@(8), d0 /* d0 = dividend */ L1: movel sp@(8), d0 /* d0 = dividend */
jpl L2 jpl L2
negl d0 negl d0
#ifndef __mcf5200__ #if !(defined(__mcf5200__) || defined(__mcoldfire__))
negb d2 negb d2
#else #else
negl d2 negl d2
......
...@@ -98,7 +98,7 @@ SYM (__modsi3): ...@@ -98,7 +98,7 @@ SYM (__modsi3):
jbsr SYM (__divsi3) jbsr SYM (__divsi3)
addql IMM (8), sp addql IMM (8), sp
movel sp@(8), d1 /* d1 = divisor */ movel sp@(8), d1 /* d1 = divisor */
#ifndef __mcf5200__ #if !(defined(__mcf5200__) || defined(__mcoldfire__))
movel d1, sp@- movel d1, sp@-
movel d0, sp@- movel d0, sp@-
jbsr SYM (__mulsi3) /* d0 = (a/b)*b */ jbsr SYM (__mulsi3) /* d0 = (a/b)*b */
......
...@@ -95,7 +95,7 @@ SYM (__mulsi3): ...@@ -95,7 +95,7 @@ SYM (__mulsi3):
muluw sp@(10), d0 /* x0*y1 */ muluw sp@(10), d0 /* x0*y1 */
movew sp@(6), d1 /* x1 -> d1 */ movew sp@(6), d1 /* x1 -> d1 */
muluw sp@(8), d1 /* x1*y0 */ muluw sp@(8), d1 /* x1*y0 */
#ifndef __mcf5200__ #if !(defined(__mcf5200__) || defined(__mcoldfire__))
addw d1, d0 addw d1, d0
#else #else
addl d1, d0 addl d1, d0
......
...@@ -91,7 +91,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -91,7 +91,7 @@ Boston, MA 02111-1307, USA. */
.proc .proc
.globl SYM (__udivsi3) .globl SYM (__udivsi3)
SYM (__udivsi3): SYM (__udivsi3):
#ifndef __mcf5200__ #if !(defined(__mcf5200__) || defined(__mcoldfire__))
movel d2, sp@- movel d2, sp@-
movel sp@(12), d1 /* d1 = divisor */ movel sp@(12), d1 /* d1 = divisor */
movel sp@(8), d0 /* d0 = dividend */ movel sp@(8), d0 /* d0 = dividend */
...@@ -136,7 +136,7 @@ L5: subql IMM (1), d0 /* adjust quotient */ ...@@ -136,7 +136,7 @@ L5: subql IMM (1), d0 /* adjust quotient */
L6: movel sp@+, d2 L6: movel sp@+, d2
rts rts
#else /* __mcf5200__ */ #else /* __mcf5200__ || __mcoldfire__ */
/* Coldfire implementation of non-restoring division algorithm from /* Coldfire implementation of non-restoring division algorithm from
Hennessy & Patterson, Appendix A. */ Hennessy & Patterson, Appendix A. */
...@@ -158,5 +158,5 @@ L2: subql IMM (1),d4 ...@@ -158,5 +158,5 @@ L2: subql IMM (1),d4
moveml sp@,d2-d4 | restore data registers moveml sp@,d2-d4 | restore data registers
unlk a6 | and return unlk a6 | and return
rts rts
#endif /* __mcf5200__ */ #endif /* __mcf5200__ || __mcoldfire__ */
...@@ -98,7 +98,7 @@ SYM (__umodsi3): ...@@ -98,7 +98,7 @@ SYM (__umodsi3):
jbsr SYM (__udivsi3) jbsr SYM (__udivsi3)
addql IMM (8), sp addql IMM (8), sp
movel sp@(8), d1 /* d1 = divisor */ movel sp@(8), d1 /* d1 = divisor */
#ifndef __mcf5200__ #if !(defined(__mcf5200__) || defined(__mcoldfire__))
movel d1, sp@- movel d1, sp@-
movel d0, sp@- movel d0, sp@-
jbsr SYM (__mulsi3) /* d0 = (a/b)*b */ jbsr SYM (__mulsi3) /* d0 = (a/b)*b */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment