]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/h8300/h8300.cc
Preparing to use shifts to eliminate redundant test/compare insns on H8
authorJeff Law <jeffreyalaw@gmail.com>
Fri, 2 Jul 2021 15:07:37 +0000 (11:07 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Fri, 2 Jul 2021 15:18:49 +0000 (11:18 -0400)
commitb60761baa6fd6acf3200e732283d133f4ce0f0e9
treedf4d7f46725f915e454731dd268ce05d4b3cb0cf
parent85017431068251628478f38346c273418c71209b
Preparing to use shifts to eliminate redundant test/compare insns on H8

* config/h8300/h8300-protos.h (output_a_shift): Make first argument
an array of rtx rather than a pointer to rtx.  Add code argument.
(compute_a_shift_length): Similarly.
* config/h8300/h8300.c (h8300_shift_costs): Adjust now that the
shift itself isn't an operand.  Create dummy operand[0] to carry
a mode and pass a suitable rtx code to compute_a_shift_length.
(get_shift_alg): Adjust operand number of clobber in output templates.
(output_a_shift): Make first argument an array of rtx rather than
a pointer to rtx.  Add code argument for the type of shift.
Adjust now that the shift itself is no longer an operand.
(compute_a_shift_length): Similarly.
* config/h8300/shiftrotate.md (shiftqi, shifthi, shiftsi): Use an
iterator rather than nshift_operator.
(shiftqi_noscratch, shifthi_noscratch, shiftsi_noscratch): Likewise.
(shiftqi_clobber_flags): Adjust to API changes in output_a_shift
and compute_a_shift_length.
(shiftqi_noscratch_clobber_flags): Likewise.
(shifthi_noscratch_clobber_flags): Likewise.
(shiftsi_noscratch_clobber_flags): Likewise.
gcc/config/h8300/h8300-protos.h
gcc/config/h8300/h8300.c
gcc/config/h8300/shiftrotate.md