1 /* src/vm/jit/s390/md.h - machine dependent s390 Linux functions
3 Copyright (C) 2006, 2007, 2008
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 This file is part of CACAO.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2, or (at
11 your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 #ifndef _VM_JIT_S390_MD_H
27 #define _VM_JIT_S390_MD_H
34 #include "vm/jit/codegen-common.h"
35 #include "vm/jit/methodtree.h"
38 /* md_stacktrace_get_returnaddress *********************************************
40 Returns the return address of the current stackframe, specified by
41 the passed stack pointer and the stack frame size.
43 *******************************************************************************/
45 inline static void *md_stacktrace_get_returnaddress(void *sp, int32_t stackframesize)
49 /* On S390 the return address is located on the top of the
52 ra = *((void **) (((uintptr_t) sp) + stackframesize - 8));
58 /* md_codegen_get_pv_from_pc ***************************************************
60 On this architecture just a wrapper function to methodtree_find.
62 *******************************************************************************/
64 inline static void *md_codegen_get_pv_from_pc(void *ra)
68 /* Get the start address of the function which contains this
69 address from the method table. */
71 pv = methodtree_find(ra);
77 /* md_cacheflush ***************************************************************
79 Calls the system's function to flush the instruction and data
82 *******************************************************************************/
84 inline static void md_cacheflush(void *addr, int nbytes)
90 /* md_icacheflush **************************************************************
92 Calls the system's function to flush the instruction cache.
94 *******************************************************************************/
96 inline static void md_icacheflush(void *addr, int nbytes)
102 /* md_dcacheflush **************************************************************
104 Calls the system's function to flush the data cache.
106 *******************************************************************************/
108 inline static void md_dcacheflush(void *addr, int nbytes)
113 #endif /* _VM_JIT_S390_MD_H */
117 * These are local overrides for various environment variables in Emacs.
118 * Please do not remove this and leave it at the end of the file, where
119 * Emacs will automagically detect them.
120 * ---------------------------------------------------------------------
123 * indent-tabs-mode: t
127 * vim:noexpandtab:sw=4:ts=4: