2 * dyngen defines for micro operation code
4 * Copyright (c) 2003 Fabrice Bellard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This 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.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 #if !defined(__DYNGEN_EXEC_H__)
20 #define __DYNGEN_EXEC_H__
22 #if defined(CONFIG_TCG_INTERPRETER)
23 /* The TCG interpreter does not need a special register AREG0,
24 * but it is possible to use one by defining AREG0.
25 * On i386, register edi seems to work. */
26 /* Run without special register AREG0 or use a value defined elsewhere. */
27 #elif defined(__i386__)
29 #elif defined(__x86_64__)
31 #elif defined(_ARCH_PPC)
33 #elif defined(__arm__)
35 #elif defined(__hppa__)
37 #elif defined(__mips__)
39 #elif defined(__sparc__)
49 #elif defined(__s390__)
51 #elif defined(__alpha__)
52 /* Note $15 is the frame pointer, so anything in op-i386.c that would
53 require a frame pointer, like alloca, would probably loose. */
55 #elif defined(__mc68000)
57 #elif defined(__ia64__)
60 #error unsupported CPU
64 register CPUArchState
*env
asm(AREG0
);
66 /* TODO: Try env = cpu_single_env. */
67 extern CPUArchState
*env
;
70 #endif /* !defined(__DYNGEN_EXEC_H__) */