zephyr/lib
Andy Ross 668bb3cb22 lib/os/heap: Compiler bug workaround on ARC
This is a workaround for a compiler bug on (at least) GCC 12.1.0 in
Zephyr SDK 0.15.1.  The optimizer generates this function with a last
instruction that is an unconditional branch (a tail call into the
chunk_set() handling).  But that means that the NEXT instruction gets
decoded as part of the branch delay slot, but that instruction isn't
part of this function!  Some instructions aren't legal in branch delay
slots.  One of those is ENTER_S, which is a very common entry
instruction for whatever function the linker places after us.  It
seems like the compiler doesn't understand this problem.  Stuff a NOP
in to guarantee the code is legal.

Comment above is duplicated in the code.  The workaround is
straightforward once the issue is understood, but the path to get here
was hilariously weird.

Fixes #54720

Signed-off-by: Andy Ross <andyross@google.com>
2023-02-10 14:32:26 -05:00
..
cpp libc/picolibc: Clean up Picolibc Kconfig for C++ 2023-01-20 09:03:25 +01:00
libc picolibc: picolibc support still not complete with many toolchains 2023-02-07 18:16:10 +01:00
open-amp openamp: Add new Kconfig option to enable dcache 2022-12-12 18:41:01 +01:00
os lib/os/heap: Compiler bug workaround on ARC 2023-02-10 14:32:26 -05:00
posix posix: mqueue: do not typedef mq_attr 2023-01-23 09:57:31 -08:00
smf lib: smf: fix include 2022-05-25 11:14:18 +09:00
util lib: getopt: rework and extend getopt library 2022-01-06 21:26:59 +01:00
CMakeLists.txt treewide: Use CONFIG_CPP instead of CONFIG_CPLUSPLUS 2023-01-13 17:42:55 -05:00
Kconfig lib: cpp: Relocate subsys/cpp to lib/cpp 2023-01-13 17:42:55 -05:00