From 38198304ccb559a021fe5abbe91a5191d8cf5f0e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 17 Aug 1998 08:25:31 +0000 Subject: [PATCH] m68k.c (output_move_simode_const): Use subl to move a zero into an address register. * m68k.c (output_move_simode_const): Use subl to move a zero into an address register. (output_move_[hq]imode): Likewise. From-SVN: r21778 --- gcc/ChangeLog | 6 ++++++ gcc/config/m68k/m68k.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 823fbe95182..afd7974f976 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Aug 17 09:23:42 1998 Andreas Schwab + + * m68k.c (output_move_simode_const): Use subl to move a zero into an + address register. + (output_move_[hq]imode): Likewise. + Mon Aug 17 09:15:47 1998 Jeffrey A Law (law@cygnus.com) * toplev.c (main): Enable -fstrict-aliasing for -O2 and above. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 64bbe4a1298..1cfe3b25d9d 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -1507,6 +1507,9 @@ output_move_simode_const (operands) || !(GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])))) return "clr%.l %0"; + else if (operands[1] == const0_rtx + && ADDRESS_REG_P (operands[0])) + return "sub%.l %0,%0"; else if (DATA_REG_P (operands[0])) return output_move_const_into_data_reg (operands); else if (ADDRESS_REG_P (operands[0]) @@ -1554,6 +1557,9 @@ output_move_himode (operands) || !(GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])))) return "clr%.w %0"; + else if (operands[1] == const0_rtx + && ADDRESS_REG_P (operands[0])) + return "sub%.l %0,%0"; else if (DATA_REG_P (operands[0]) && INTVAL (operands[1]) < 128 && INTVAL (operands[1]) >= -128) @@ -1668,6 +1674,8 @@ output_move_qimode (operands) return "moveq %1,%0"; #endif } + if (operands[1] == const0_rtx && ADDRESS_REG_P (operands[0])) + return "sub%.l %0,%0"; if (GET_CODE (operands[1]) != CONST_INT && CONSTANT_P (operands[1])) return "move%.l %1,%0"; /* 68k family doesn't support byte moves to from address registers. The -- 2.30.2