From 2b13f9af98e75cf0c304a053ecb29c8e98744ab6 Mon Sep 17 00:00:00 2001 From: Aleksey Demakov Date: Thu, 5 Feb 2009 21:06:43 +0000 Subject: [PATCH] add jit-arch-arm.h --- ChangeLog | 5 +++-- include/jit/jit-arch-arm.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 include/jit/jit-arch-arm.h diff --git a/ChangeLog b/ChangeLog index 4384569..875e832 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2009-02-06 Michele Tartara - * jit/jit-rules.h; define JIT_BACKEND_ARM on ARM - * tools/gen-apply.c: define PLATFORM_IS_ARM on ARM + * jit/jit-rules.h; define JIT_BACKEND_ARM on ARM. + * tools/gen-apply.c: define PLATFORM_IS_ARM on ARM. + * include/jit/jit-arch-arm.h: add ARM arch header. 2009-01-30 Peter Fristedt Kirill Kononenko diff --git a/include/jit/jit-arch-arm.h b/include/jit/jit-arch-arm.h new file mode 100644 index 0000000..88223db --- /dev/null +++ b/include/jit/jit-arch-arm.h @@ -0,0 +1,38 @@ +/* + * jit-arch-arm.h - Architecture-specific definitions. + * + * Copyright (C) 2006 Southern Storm Software, Pty Ltd. + * + * The libjit library is free software: you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 2.1 of + * the License, or (at your option) any later version. + * + * The libjit library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the libjit library. If not, see + * . + */ + +#ifndef _JIT_ARCH_ARM_H +#define _JIT_ARCH_ARM_H + +/* + * If defined _JIT_ARCH_GET_CURRENT_FRAME() macro assigns the current frame + * pointer to the supplied argument that has to be a void pointer. + */ +#if defined(__GNUC__) +#define _JIT_ARCH_GET_CURRENT_FRAME(f) \ + do { \ + register void *__f asm("fp"); \ + f = __f; \ + } while(0) +#else +#undef _JIT_ARCH_GET_CURRENT_FRAME +#endif + +#endif /* _JIT_ARCH_ARM_H */ -- 2.47.3