aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-06-06 17:40:30 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-06-06 17:40:30 -0400
commit240922421def12476ef77ed7d2b4feecd56b0a6f (patch)
treef3f111b00ce84b81d5684025d43dae8657ab9e64
parent106bee4b93f05e7ef8b24a56c66e1351d6206ae3 (diff)
downloadgcc-240922421def12476ef77ed7d2b4feecd56b0a6f.zip
gcc-240922421def12476ef77ed7d2b4feecd56b0a6f.tar.gz
gcc-240922421def12476ef77ed7d2b4feecd56b0a6f.tar.bz2
(const_method): Do not synthesize long constants with byte or word
operations with TARGET_5200. From-SVN: r12181
-rw-r--r--gcc/config/m68k/m68k.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 9dc952a..2e52479 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -1066,20 +1066,26 @@ const_method (constant)
i = INTVAL (constant);
if (USE_MOVQ (i))
return MOVQ;
- /* if -256 < N < 256 but N is not in range for a moveq
- N^ff will be, so use moveq #N^ff, dreg; not.b dreg. */
- if (USE_MOVQ (i ^ 0xff))
- return NOTB;
- /* Likewise, try with not.w */
- if (USE_MOVQ (i ^ 0xffff))
- return NOTW;
- /* This is the only value where neg.w is useful */
- if (i == -65408)
- return NEGW;
- /* Try also with swap */
- u = i;
- if (USE_MOVQ ((u >> 16) | (u << 16)))
- return SWAP;
+
+ /* The Coldfire doesn't have byte or word operations. */
+ /* FIXME: This may not be useful for the m68060 either */
+ if (!TARGET_5200)
+ {
+ /* if -256 < N < 256 but N is not in range for a moveq
+ N^ff will be, so use moveq #N^ff, dreg; not.b dreg. */
+ if (USE_MOVQ (i ^ 0xff))
+ return NOTB;
+ /* Likewise, try with not.w */
+ if (USE_MOVQ (i ^ 0xffff))
+ return NOTW;
+ /* This is the only value where neg.w is useful */
+ if (i == -65408)
+ return NEGW;
+ /* Try also with swap */
+ u = i;
+ if (USE_MOVQ ((u >> 16) | (u << 16)))
+ return SWAP;
+ }
/* Otherwise, use move.l */
return MOVL;
}