Closed boborjan2 closed 2 years ago
Hi @boborjan2, in ESP-IDF the zero-overhead loops are enabled, it is just the zero-overhead loop buffer is disabled.
The erratum itself says that supposedly in some cases the CPU may get an invalid instruction word from the zero-overhead loop buffer. Since we have disabled the buffer, the code can use zero-overhead loop instructions without any restrictions. Disabling the zero-overhead loop buffer has no effect on the ESP32 (or ESP32-S3) in terms of performance.
Problem Description
This part of esp-idf suggests that there is a sporadic? (or just rare?) issue with zero overhead loops: https://github.com/espressif/esp-idf/blob/master/components/xtensa/esp32/include/xtensa/config/core.h#L1405 That's why it's usage is turned off in gcc.
Now esp-dsp does use these loops (seemingly without issues). Can you provide us with some details in the topic? I found no further info on this erratum 572.
Thanks Viktor