diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2023-04-27 02:00:33 +0200 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2023-04-27 02:00:33 +0200 |
commit | d7f0bc05949481048d2fd524ecb2d892f6a04294 (patch) | |
tree | 9271b7df39b06863f94d1d97653a2aa660792005 /libgcc/config | |
parent | 2a26872984c109a98d0ad733b0c68c3e1648ec86 (diff) | |
download | gcc-d7f0bc05949481048d2fd524ecb2d892f6a04294.zip gcc-d7f0bc05949481048d2fd524ecb2d892f6a04294.tar.gz gcc-d7f0bc05949481048d2fd524ecb2d892f6a04294.tar.bz2 |
libgcc CRIS: Define TARGET_HAS_NO_HW_DIVIDE
With this, execution time for e.g. __moddi3 go from 59 to 40 cycles in
the "fast" case or from 290 to 200 cycles in the "slow" case (when the
!TARGET_HAS_NO_HW_DIVIDE variant calls division and modulus functions
for 32-bit SImode), as exposed by gcc.c-torture/execute/arith-rand-ll.c
compiled for -march=v10.
Unfortunately, it just puts a performance improvement "dent" of 0.07%
in a arith-rand-ll.c-based performance test - where all loops are also
reduced to 1/10.
The size of every affected libgcc function is reduced to less than
half and they are all now leaf functions.
* config/cris/t-cris (HOST_LIBGCC2_CFLAGS): Add
-DTARGET_HAS_NO_HW_DIVIDE.
Diffstat (limited to 'libgcc/config')
-rw-r--r-- | libgcc/config/cris/t-cris | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgcc/config/cris/t-cris b/libgcc/config/cris/t-cris index b582974..e002029 100644 --- a/libgcc/config/cris/t-cris +++ b/libgcc/config/cris/t-cris @@ -8,3 +8,6 @@ $(LIB2ADD): $(srcdir)/config/cris/arit.c echo "#define L$$name" > tmp-$@ \ && echo '#include "$<"' >> tmp-$@ \ && mv -f tmp-$@ $@ + +# Use an appropriate implementation when implementing DImode division. +HOST_LIBGCC2_CFLAGS += -DTARGET_HAS_NO_HW_DIVIDE |