diff options
author | Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> | 1998-07-13 22:33:07 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-07-13 16:33:07 -0600 |
commit | 4a8c52e0487bb8afe279f041ac113ed4e2895ddb (patch) | |
tree | 1565266485a8a63fdde52c94c3cb105dec94546f /gcc | |
parent | 4280146803b2daf0df4c47eaf07fc73094fd47be (diff) | |
download | gcc-4a8c52e0487bb8afe279f041ac113ed4e2895ddb.zip gcc-4a8c52e0487bb8afe279f041ac113ed4e2895ddb.tar.gz gcc-4a8c52e0487bb8afe279f041ac113ed4e2895ddb.tar.bz2 |
* m68k.c (output_scc_di): Use cmpw #0 only for address registers.
From-SVN: r21119
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 45 |
2 files changed, 33 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6ca0c3..1a86cbe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Mon Jul 13 23:31:04 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * m68k.c (output_scc_di): Use cmpw #0 only for address registers. + Mon Jul 13 23:26:43 1998 Jeffrey A Law (law@cygnus.com) * tree.h (tree_common): Note front-end dependencies on layout of diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index ba889ad..64bbe4a 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -1046,39 +1046,52 @@ output_scc_di(op, operand1, operand2, dest) } loperands[4] = gen_label_rtx(); if (operand2 != const0_rtx) + { #ifdef MOTOROLA #ifdef SGS_CMP_ORDER - output_asm_insn ("cmp%.l %0,%2\n\tjbne %l4\n\tcmp%.l %1,%3", loperands); + output_asm_insn ("cmp%.l %0,%2\n\tjbne %l4\n\tcmp%.l %1,%3", loperands); #else - output_asm_insn ("cmp%.l %2,%0\n\tjbne %l4\n\tcmp%.l %3,%1", loperands); + output_asm_insn ("cmp%.l %2,%0\n\tjbne %l4\n\tcmp%.l %3,%1", loperands); #endif #else #ifdef SGS_CMP_ORDER - output_asm_insn ("cmp%.l %0,%2\n\tjne %l4\n\tcmp%.l %1,%3", loperands); + output_asm_insn ("cmp%.l %0,%2\n\tjne %l4\n\tcmp%.l %1,%3", loperands); #else - output_asm_insn ("cmp%.l %2,%0\n\tjne %l4\n\tcmp%.l %3,%1", loperands); + output_asm_insn ("cmp%.l %2,%0\n\tjne %l4\n\tcmp%.l %3,%1", loperands); #endif #endif - else if (TARGET_68020 || TARGET_5200) -#ifdef MOTOROLA - output_asm_insn ("tst%.l %0\n\tjbne %l4\n\ttst%.l %1", loperands); -#else - output_asm_insn ("tst%.l %0\n\tjne %l4\n\ttst%.l %1", loperands); -#endif + } else -#ifdef MOTOROLA + { + if (TARGET_68020 || TARGET_5200 || ! ADDRESS_REG_P (loperands[0])) + output_asm_insn ("tst%.l %0", loperands); + else + { #ifdef SGS_CMP_ORDER - output_asm_insn ("cmp%.w %0,%#0\n\tjbne %l4\n\tcmp%.w %1,%#0", loperands); + output_asm_insn ("cmp%.w %0,%#0", loperands); #else - output_asm_insn ("cmp%.w %#0,%0\n\tjbne %l4\n\tcmp%.w %#0,%1", loperands); + output_asm_insn ("cmp%.w %#0,%0", loperands); #endif + } + +#ifdef MOTOROLA + output_asm_insn ("jbne %l4", loperands); #else + output_asm_insn ("jne %l4", loperands); +#endif + + if (TARGET_68020 || TARGET_5200 || ! ADDRESS_REG_P (loperands[1])) + output_asm_insn ("tst%.l %1", loperands); + else + { #ifdef SGS_CMP_ORDER - output_asm_insn ("cmp%.w %0,%#0\n\tjne %l4\n\tcmp%.w %1,%#0", loperands); + output_asm_insn ("cmp%.w %1,%#0", loperands); #else - output_asm_insn ("cmp%.w %#0,%0\n\tjne %l4\n\tcmp%.w %#0,%1", loperands); -#endif + output_asm_insn ("cmp%.w %#0,%1", loperands); #endif + } + } + loperands[5] = dest; switch (op_code) |