github.com/goccy/go-jit@v0.0.0-20200514131505-ff78d45cf6af/internal/ccall/include/jit/jit-arch-arm.h (about) 1 /* 2 * jit-arch-arm.h - Architecture-specific definitions. 3 * 4 * Copyright (C) 2006 Southern Storm Software, Pty Ltd. 5 * 6 * The libjit library is free software: you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public License 8 * as published by the Free Software Foundation, either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * The libjit library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with the libjit library. If not, see 18 * <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef _JIT_ARCH_ARM_H 22 #define _JIT_ARCH_ARM_H 23 24 /* 25 * If defined _JIT_ARCH_GET_CURRENT_FRAME() macro assigns the current frame 26 * pointer to the supplied argument that has to be a void pointer. 27 */ 28 #if defined(__GNUC__) 29 #define _JIT_ARCH_GET_CURRENT_FRAME(f) \ 30 do { \ 31 register void *__f asm("fp"); \ 32 f = __f; \ 33 } while(0) 34 #else 35 #undef _JIT_ARCH_GET_CURRENT_FRAME 36 #endif 37 38 #endif /* _JIT_ARCH_ARM_H */