diff options
author | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-28 01:48:20 +0000 |
---|---|---|
committer | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-28 01:48:20 +0000 |
commit | 92a23dbb1d060907dfc5c6398c8e84d9a9ab4b7a (patch) | |
tree | c7b455895c29cf7a62be2db9b47ae2a2c8a88f1f /gcc/config/m68k | |
parent | 1dffba175bcfe2c6734039c8b09df1aa97c58d44 (diff) | |
download | gcc-92a23dbb1d060907dfc5c6398c8e84d9a9ab4b7a.tar.gz |
* config/m68k/m68k.md (cmpsi+1): Use cmp.w when comparing a 16 bit
constant with an address register.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26684 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r-- | gcc/config/m68k/m68k.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 03138d4b428..a8dac721d99 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -537,6 +537,17 @@ 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 return \"cmp%.l %d0,%d1\"; #else |