From: Andreas Schwab Date: Wed, 28 Apr 1999 01:48:20 +0000 (+0000) Subject: m68k.md (cmpsi+1): Use cmp.w when comparing a 16 bit constant with an address register. X-Git-Tag: prereleases/gcc-2.95-test~716 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41a12ce742909b56b505f7b9d915de418b2dee2f;p=thirdparty%2Fgcc.git m68k.md (cmpsi+1): Use cmp.w when comparing a 16 bit constant with an address register. * config/m68k/m68k.md (cmpsi+1): Use cmp.w when comparing a 16 bit constant with an address register. From-SVN: r26684 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db234adf682a..9bbb9d4ee0bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Apr 28 10:36:39 1999 Andreas Schwab + + * config/m68k/m68k.md (cmpsi+1): Use cmp.w when comparing a 16 bit + constant with an address register. + Wed Apr 28 00:14:41 PDT 1999 Jeff Law (law@cygnus.com) * version.c: Bump for snapshot. diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 03138d4b4286..a8dac721d993 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -535,6 +535,17 @@ return \"cmp%.l %d1,%d0\"; #else return \"cmp%.l %d0,%d1\"; +#endif + } + if (ADDRESS_REG_P (operands[0]) + && GET_CODE (operands[1]) == CONST_INT + && INTVAL (operands[1]) < 0x8000 + && INTVAL (operands[1]) >= -0x8000) + { +#ifdef SGS_CMP_ORDER + return \"cmp%.w %0,%1\"; +#else + return \"cmp%.w %1,%0\"; #endif } #ifdef SGS_CMP_ORDER