From 2d75548f6193337eb59eb3048d2433c56807c3f0 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 30 Dec 2002 21:08:42 +0000 Subject: [PATCH] h8300.c (output_logical_op): Use extu.w in more cases. * config/h8300/h8300.c (output_logical_op): Use extu.w in more cases. (compute_logical_op_length): Update to reflect the change in output_logical_op. (compute_logical_op_cc): Likewise. From-SVN: r60649 --- gcc/ChangeLog | 8 ++++++++ gcc/config/h8300/h8300.c | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c091ed4d3a..8d8098fb4ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2002-12-30 Kazu Hirata + + * config/h8300/h8300.c (output_logical_op): Use extu.w in more + cases. + (compute_logical_op_length): Update to reflect the change in + output_logical_op. + (compute_logical_op_cc): Likewise. + 2002-12-30 Joseph S. Myers * doc/service.texi: Uncomment and update FAQ link. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index e77edaf82a2..baa50bb29a5 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -2152,8 +2152,10 @@ output_logical_op (mode, operands) && ((det & 0xffff0000) != 0) && (code == IOR || det != 0xffffff00) && (code == IOR || det != 0xffff00ff) - && (code != AND || det != 0xff00ff00) - && (code != AND || det != 0xff0000ff)) + && !(code == AND + && (det == 0xff00ffff + || (det & 0xffff00ff) == 0xff000000 + || (det & 0xffffff00) == 0xff000000))) { sprintf (insn_buf, "%s.l\t%%S2,%%S0", opname); output_asm_insn (insn_buf, operands); @@ -2285,8 +2287,10 @@ compute_logical_op_length (mode, operands) && ((det & 0xffff0000) != 0) && (code == IOR || det != 0xffffff00) && (code == IOR || det != 0xffff00ff) - && (code != AND || det != 0xff00ff00) - && (code != AND || det != 0xff0000ff)) + && !(code == AND + && (det == 0xff00ffff + || (det & 0xffff00ff) == 0xff000000 + || (det & 0xffffff00) == 0xff000000))) { if (REG_P (operands[2])) length += 4; @@ -2392,8 +2396,10 @@ compute_logical_op_cc (mode, operands) && ((det & 0xffff0000) != 0) && (code == IOR || det != 0xffffff00) && (code == IOR || det != 0xffff00ff) - && (code != AND || det != 0xff00ff00) - && (code != AND || det != 0xff0000ff)) + && !(code == AND + && (det == 0xff00ffff + || (det & 0xffff00ff) == 0xff000000 + || (det & 0xffffff00) == 0xff000000))) { cc = CC_SET_ZNV; }