2004-05-29 Peter Barada <peter@the-baradas.com>
- * config/m68k/m68k.h(EXTRA_CONSTRAINT): add 'U' for register offset
+ * config/m68k/m68k.c (CONST_METHOD): Add MVZ, MVS.
+ * config/m68k/m68k.c (const_method): Likewise.
+ * config/m68k/m68k.c (const_int_cost): Likewise.
+ * config/m68k/m68k.c (const_int_cost): Likewise.
+ * config/m68k/m68k.c (output_move_const_into_data_reg): Likewise.
+
+2004-05-29 Peter Barada <peter@the-baradas.com>
+
+ * config/m68k/m68k.h (EXTRA_CONSTRAINT): add 'U' for register offset
addressing.
* config/m68k/m68k.md: Add 'U,U' alternative to ColdFire variants of
movsi,movhi,movqi insn patterns.
}
\f
-typedef enum { MOVL, SWAP, NEGW, NOTW, NOTB, MOVQ } CONST_METHOD;
+typedef enum { MOVL, SWAP, NEGW, NOTW, NOTB, MOVQ, MVS, MVZ } CONST_METHOD;
static CONST_METHOD const_method (rtx);
if (USE_MOVQ ((u >> 16) | (u << 16)))
return SWAP;
}
+
+ if (TARGET_CFV4)
+ {
+ /* Try using MVZ/MVS with an immedaite value to load constants. */
+ if (i >= 0 && i <= 65535)
+ return MVZ;
+ if (i >= -32768 && i <= 32767)
+ return MVS;
+ }
+
/* Otherwise, use move.l */
return MOVL;
}
case MOVQ :
/* Constants between -128 and 127 are cheap due to moveq */
return 0;
+ case MVZ:
+ case MVS:
case NOTB :
case NOTW :
case NEGW :
i = INTVAL (operands[1]);
switch (const_method (operands[1]))
{
+ case MVZ:
+ return "mvsw %1,%0";
+ case MVS:
+ return "mvzw %1,%0";
case MOVQ :
return "moveq %1,%0";
case NOTB :