From 3c758d821a49e53d1c4030adf5c780af2d18bf20 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 31 Jan 1996 08:25:57 -0500 Subject: [PATCH] (movqi): Use moveq if possible. From-SVN: r11138 --- gcc/config/m68k/m68k.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index d65d84d..84c197c 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -1071,6 +1071,17 @@ return \"st %0\"; } } + if (GET_CODE (operands[1]) == CONST_INT + && DATA_REG_P (operands[0]) + && INTVAL (operands[1]) < 128 + && INTVAL (operands[1]) >= -128) + { +#if defined(MOTOROLA) && !defined(CRDS) + return \"moveq%.l %1,%0\"; +#else + return \"moveq %1,%0\"; +#endif + } if (GET_CODE (operands[1]) != CONST_INT && CONSTANT_P (operands[1])) return \"move%.l %1,%0\"; if (ADDRESS_REG_P (operands[0]) || ADDRESS_REG_P (operands[1])) -- 2.7.4