]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] rx: allow cmpstrnsi len to be zero
authorKeith Packard <keithp@keithp.com>
Sat, 15 Feb 2025 16:17:41 +0000 (09:17 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 15 Feb 2025 16:17:41 +0000 (09:17 -0700)
commit11cc336eed42892b7cfc2bfcf7b3f3f86f61787a
treec24df8a3c690cea6a9624ce57a64373954c23ee1
parentf9868e623fc80c6c6260c9dc6c7280db90433207
[PATCH] rx: allow cmpstrnsi len to be zero

The SCMPU instruction doesn't change the C and Z flags when the
incoming length is zero, which means the insn will produce a
value based upon the existing flag values.

As a quick kludge, adjust these flags to ensure a zero result in this
case.

gcc/
* config/rx/rx.md (rx_cmpstrn): Correctly handle len=0 case.
gcc/config/rx/rx.md