| * arch/xtensa/kernel/mcount.S |
| * Xtensa specific mcount support |
| * This file is subject to the terms and conditions of the GNU General Public |
| * License. See the file "COPYING" in the main directory of this archive |
| * Copyright (C) 2013 Tensilica Inc. |
| #include <linux/linkage.h> |
| #include <asm/asmmacro.h> |
| * a2: a0 of the caller in windowed ABI |
| * a10: a0 of the caller in call0 ABI |
| * In call0 ABI the function _mcount is called with the special ABI: |
| * its argument is in a10 and all the usual argument registers (a2 - a7) |
| * must be preserved in addition to callee-saved a12 - a15. |
| #if defined(__XTENSA_WINDOWED_ABI__) |
| movi a4, ftrace_trace_function |
| addi a6, a6, -MCOUNT_INSN_SIZE |
| #elif defined(__XTENSA_CALL0_ABI__) |
| movi a9, ftrace_trace_function |
| addi a2, a10, -MCOUNT_INSN_SIZE |
| #error Unsupported Xtensa ABI |