aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@issan.informatik.uni-dortmund.de>1998-08-17 08:25:31 +0000
committerJeff Law <law@gcc.gnu.org>1998-08-17 02:25:31 -0600
commit38198304ccb559a021fe5abbe91a5191d8cf5f0e (patch)
treebf260083239587c93c7342d2b98ef0d7a1d9e7f9 /gcc
parent3f9a83a91b7fe23514b34c1f20be785ce935ba9b (diff)
downloadgcc-38198304ccb559a021fe5abbe91a5191d8cf5f0e.zip
gcc-38198304ccb559a021fe5abbe91a5191d8cf5f0e.tar.gz
gcc-38198304ccb559a021fe5abbe91a5191d8cf5f0e.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/m68k/m68k.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 823fbe9..afd7974 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Mon Aug 17 09:23:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * 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 64bbe4a..1cfe3b2 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