1/* SPDX-License-Identifier: BSD-2-Clause */ 2/* 3 * Copyright (c) 2019, Linaro Limited 4 */ 5 6#include <asm.S> 7 8#if defined(CFG_UNWIND) 9#define UNWIND(...) __VA_ARGS__ 10#else 11#define UNWIND(...) 12#endif 13 14/* 15 * This function is the bottom of the user call stack. Mark it as such so that 16 * the unwinding code won't try to go further down. 17 * We need an assembly wrapper because Clang does not accept asm(".cantunwind") 18 * in a C function: 19 * 20 * user_ta_header.c:44:6: error: .fnstart must precede .cantunwind directive 21 * asm(".cantunwind"); 22 * ^ 23 */ 24FUNC __ta_entry, : 25UNWIND( .fnstart) 26UNWIND( .cantunwind) 27 bl __ta_entry_c 28 /* 29 * The nop makes the stack unwinding more clear (without it, 30 * symbolize.py may show a file/line outside the function). 31 */ 32 nop 33UNWIND( .fnend) 34END_FUNC __ta_entry 35