1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#pragma once 14 15/* Quick and dirty way of acquiring a stack before you call a function. Use 16 * this as a debugging helper when you need to call a function from a context 17 * where you don't have a stack. Note, there are arguments to this function, 18 * but they are passed in registers: 19 * ARM x86 20 * Function pointer to jump to r0 eax 21 * First argument r1 ebx 22 * Second argument r2 ecx 23 * Third argument r3 edx 24 * 25 * This function is not thread safe, has not been tested thoroughly and you 26 * should not return from the target function being jumped to. This is *only* 27 * meant as a debugging helper for when you need a stack, but not stability. 28 */ 29void __attribute__((noreturn)) debug_trampoline(void); 30 31