From d9a5c8f38765812e93ffc9a28480423e6e81c95e Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 16 May 2019 10:36:48 +0800 Subject: [PATCH] esp32: Use FPU for floating point divide, power, complex multiplications * Linker was choosing ROM symbols for these, which use integer soft-float operations and are much slower. * _divsf3() moved to IRAM to avoid regressions with any code that does integer float division in IRAM interrupt handlers (+88 bytes IRAM) * Thanks to michal for reporting: https://esp32.com/viewtopic.php?f=14&t=10540&p=43367 --- components/esp32/linker.lf | 1 + components/esp_rom/esp32/ld/esp32.rom.libgcc.ld | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/components/esp32/linker.lf b/components/esp32/linker.lf index b7bb89f6e..db73d2dc9 100644 --- a/components/esp32/linker.lf +++ b/components/esp32/linker.lf @@ -7,6 +7,7 @@ entries: archive: libgcc.a entries: lib2funcs (noflash_text) + _divsf3 (noflash) [mapping:gcov] archive: libgcov.a diff --git a/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld b/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld index dfdbe2588..0bda115dc 100644 --- a/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld +++ b/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld @@ -24,8 +24,6 @@ __ctzsi2 = 0x4000c7f0; __divdc3 = 0x400645a4; __divdf3 = 0x40002954; __divdi3 = 0x4000ca84; -__divsc3 = 0x4006429c; -__divsf3 = 0x4000234c; __divsi3 = 0x4000c7b8; __eqdf2 = 0x400636a8; __eqsf2 = 0x40063374; @@ -62,7 +60,6 @@ __modsi3 = 0x4000c7c0; __muldc3 = 0x40063c90; __muldf3 = 0x4006358c; __muldi3 = 0x4000c9fc; -__mulsc3 = 0x40063944; __mulsf3 = 0x400632c8; __mulsi3 = 0x4000c7b0; __mulvdi3 = 0x40002d78; @@ -80,7 +77,6 @@ __popcount_tab = 0x3ff96544; __popcountdi2 = 0x40002ef8; __popcountsi2 = 0x40002ed0; __powidf2 = 0x400638e4; -__powisf2 = 0x4006389c; __subdf3 = 0x400026e4; __subsf3 = 0x400021d0; __subvdi3 = 0x40002d20;