60325019aa
Align compiler flags of SOF Zephyr build with the build SOF XTOS and use -fstrict-overflow. With -fno-strict-overflow, some versions of XCC compiler (e.g. xt-xcc 12.0.8) always emit a "bltu" instruction to check for overflow in loops like: unsigned int n; for(n = 0; n < 1024; n++) do_arithmetic(); With "-fno-strict-overflow", you'll have: 18: 068076 loop a0, 22 <dummy_dspload+0x22> 1b: 445a add.n a4, a4, a5 1d: 551b addi.n a5, a5, 1 1f: 023657 bltu a6, a5, 25 <dummy_dspload+0x25> 22: fffc86 j 18 <dummy_dspload+0x18> With "-fstrict-overflow": 16: 038476 loop a4, 1d <dummy_dspload+0x1d> 19: 223a add.n a2, a2, a3 1b: 331b addi.n a3, a3, 1 As this is a common pattern in audio DSP code, change the default for SOF builds to -fstrict-overflow. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> |
||
---|---|---|
.. | ||
application_development | ||
arch | ||
basic | ||
bluetooth | ||
boards | ||
compression | ||
drivers | ||
hello_world | ||
kernel | ||
modules | ||
net | ||
philosophers | ||
posix | ||
sensor | ||
shields | ||
subsys | ||
synchronization | ||
tfm_integration | ||
userspace | ||
classic.rst | ||
index.rst |