Fix minor bugs in H8 port logical ops. Prepare for more compare/test removal
authorJeff Law <jeffreyalaw@gmail.com>
Wed, 2 Jun 2021 04:56:38 +0000 (00:56 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Wed, 2 Jun 2021 05:06:35 +0000 (01:06 -0400)
commit4ea5fe8b4002d15c8706749a3c43ed107c9a02f9
treed96afd475e83917e648578c4383a3d2db84e539d
parentb75978d14fc35981ffd8bf060ee52300db4dae50
Fix minor bugs in H8 port logical ops.  Prepare for more compare/test removal

gcc/
* config/h8300/h8300-protos.h (compute_a_shift_length): Drop unused
argument from prototype.
(output_logical_op): Add rtx_code argument.
(compute_logical_op_length): Likewise.
* config/h8300/h8300.c (h8300_and_costs): Pass additional argument
to compute_a_shift_length.
(output_logical_op); New argument with the rtx code rather than
extracting it from an operand.  Handle QImode too.
(compute_logical_op_length): Similary.
(compute_a_shift_length): Drop unused argument.
* config/h8300/h8300.md (logicals): New code iterator.
* config/h8300/logical.md (<code><mode>3 expander): Combine
the "and" expander with the "ior"/"xor" expander.
(bclr<mode>msx): Combine the QI/HI mode patterns.
(<logical><mode>3 insns): Use code iterator rather than match_operator.
Handle QImode as well.   Update call to output_logical_op and
compute_logical_op_length to pass in rtx_code
Fix split condition on all define_insn_and_split patterns.
(one_cmpl<mode>2<cczn>): Use <cczn> to support both clobbering
the flags and setting ZN via existing define_subst.
* config/h8300/shiftrotate.md: Drop unused argument from
calls to compute_a_shift_length.

Signed-off-by: Jeff Law <jeffreyalaw@gmail.com>
gcc/config/h8300/h8300-protos.h
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.md
gcc/config/h8300/logical.md
gcc/config/h8300/shiftrotate.md