diff options
author | Keith Packard <keithp@keithp.com> | 2025-04-16 14:10:18 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2025-04-16 14:10:18 -0600 |
commit | 83340869a21baafc889c05b6b5c632a226c509bc (patch) | |
tree | 8f92f126ee8abc6747d2f4e90dc2f7db248d6dda /libjava/classpath/lib/java | |
parent | d5d7dfab811de74cff88759785d0d5068b3b1121 (diff) | |
download | gcc-83340869a21baafc889c05b6b5c632a226c509bc.zip gcc-83340869a21baafc889c05b6b5c632a226c509bc.tar.gz gcc-83340869a21baafc889c05b6b5c632a226c509bc.tar.bz2 |
[PATCH] rx: avoid adding setpsw for rx_cmpstrn when len is const
pattern using rx_cmpstrn is cmpstrsi for which len is a constant -1,
so we'll be moving the setpsw instructions from rx_cmpstrn to
cmpstrnsi as follows:
1. Adjust the predicate on the length operand from "register_operand"
to "nonmemory_operand". This will allow constants to appear here,
instead of having them already transferred into a register.
2. Check to see if the len value is constant, and then check if it is
actually zero. In that case, short-circuit the rest of the pattern
and set the result register to 0.
3. Emit 'setpsw c' and 'setpsw z' instructions when the len is not a
constant, in case it turns out to be zero at runtime.
4. Remove the two 'setpsw' instructions from rx_cmpstrn.
gcc/
* config/rx/rx.md (cmpstrnsi): Allow constant length. For
static length 0, just store 0 into the output register.
For dynamic zero, set C/Z appropriately.
(rxcmpstrn): No longer set C/Z.
Diffstat (limited to 'libjava/classpath/lib/java')
0 files changed, 0 insertions, 0 deletions