From 392582fae8add8b11515a369699f0da0045bcaef Mon Sep 17 00:00:00 2001 From: Kamil Iskra Date: Mon, 6 Jul 1998 23:23:56 +0200 Subject: [PATCH] m68k.c (output_scc_di): Use cmpw #0 instead of tstl when testing address registers on the 68000. * m68k.c (output_scc_di): Use cmpw #0 instead of tstl when testing address registers on the 68000. From-SVN: r20963 --- gcc/ChangeLog | 5 +++++ gcc/config/m68k/m68k.c | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1aac5d0718a..073aadb9150 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 6 22:21:56 1998 Kamil Iskra + + * m68k.c (output_scc_di): Use cmpw #0 instead of tstl when + testing address registers on the 68000. + Mon Jul 6 22:17:19 1998 Alasdair Baird * jump.c (jump_optimize) Check for CONST_INT before using INTVAL. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 164cf6bc223..e6a3caba104 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -1059,11 +1059,25 @@ output_scc_di(op, operand1, operand2, dest) output_asm_insn ("cmp%.l %2,%0\n\tjne %l4\n\tcmp%.l %3,%1", loperands); #endif #endif - else + 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 +#ifdef SGS_CMP_ORDER + output_asm_insn ("cmp%.w %0,%#0\n\tjbne %l4\n\tcmp%.w %1,%#0", loperands); +#else + output_asm_insn ("cmp%.w %#0,%0\n\tjbne %l4\n\tcmp%.w %#0,%1", loperands); +#endif +#else +#ifdef SGS_CMP_ORDER + output_asm_insn ("cmp%.w %0,%#0\n\tjne %l4\n\tcmp%.w %1,%#0", loperands); +#else + output_asm_insn ("cmp%.w %#0,%0\n\tjne %l4\n\tcmp%.w %#0,%1", loperands); +#endif #endif loperands[5] = dest; -- 2.30.2