]> gcc.gnu.org Git - gcc.git/commit
libgcc pru: Define TARGET_HAS_NO_HW_DIVIDE
authorDimitar Dimitrov <dimitar@dinux.eu>
Thu, 27 Apr 2023 16:07:47 +0000 (19:07 +0300)
committerDimitar Dimitrov <dimitar@dinux.eu>
Mon, 1 May 2023 08:08:51 +0000 (11:08 +0300)
commit1ee457a5febc8aa1e21d2298769bc70975f0206f
treea6ff8ba81a912acef1e16c562798fda009bb4e75
parent19a5b824ef1486a5caf94c7cde7facb2dd4fd96e
libgcc pru: Define TARGET_HAS_NO_HW_DIVIDE

This patch aligns the configuration to the actual PRU capabilities. It
also reduces the size of the affected libgcc functions.

For a real-world project using integer arithmetics the savings
are significant:

  Before:
     text    data     bss     dec     hex filename
     3688     865     544    5097    13e9 hc-sr04-range-sensor.elf

  With TARGET_HAS_NO_HW_DIVIDE defined:
     text    data     bss     dec     hex filename
     2824     865     544    4233    1089 hc-sr04-range-sensor.elf

Execution speed also appears to have improved. The moddi3 function is
now executed in half the CPU cycles.

libgcc/ChangeLog:

* config/pru/t-pru (HOST_LIBGCC2_CFLAGS): Add
-DTARGET_HAS_NO_HW_DIVIDE.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
libgcc/config/pru/t-pru
This page took 0.061697 seconds and 6 git commands to generate.