blob: fbde29ea014edc990c308c6ee615ac7f9726b9e5 [file] [log] [blame]
bellard79638562003-06-15 19:46:57 +00001/*
2 * dyngen defines for micro operation code
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
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.
10 *
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.
15 *
16 * You should have received a copy of the GNU Lesser General Public
Blue Swirl8167ee82009-07-16 20:47:01 +000017 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
bellard79638562003-06-15 19:46:57 +000018 */
bellard67867302003-11-23 17:05:30 +000019#if !defined(__DYNGEN_EXEC_H__)
20#define __DYNGEN_EXEC_H__
21
ths522777b2007-05-08 23:30:44 +000022#if defined(__i386__)
bellard79638562003-06-15 19:46:57 +000023#define AREG0 "ebp"
ths522777b2007-05-08 23:30:44 +000024#elif defined(__x86_64__)
ths43024c62007-02-10 18:21:04 +000025#define AREG0 "r14"
malce58ffeb2009-01-14 18:39:49 +000026#elif defined(_ARCH_PPC)
bellard79638562003-06-15 19:46:57 +000027#define AREG0 "r27"
ths522777b2007-05-08 23:30:44 +000028#elif defined(__arm__)
bellard79638562003-06-15 19:46:57 +000029#define AREG0 "r7"
aurel32f54b3f92008-04-12 20:14:54 +000030#elif defined(__hppa__)
31#define AREG0 "r17"
ths522777b2007-05-08 23:30:44 +000032#elif defined(__mips__)
Stefan Weil60bf84c2010-04-09 17:28:40 +020033#define AREG0 "s0"
ths522777b2007-05-08 23:30:44 +000034#elif defined(__sparc__)
Juan Quinteladfe5fff2009-07-27 16:12:40 +020035#ifdef CONFIG_SOLARIS
bellardfdbb4692006-06-14 17:32:25 +000036#define AREG0 "g2"
bellardfdbb4692006-06-14 17:32:25 +000037#else
bellard74ccb342006-07-18 21:23:34 +000038#ifdef __sparc_v9__
blueswir1e97b6402008-07-26 17:19:35 +000039#define AREG0 "g5"
bellard74ccb342006-07-18 21:23:34 +000040#else
bellard79638562003-06-15 19:46:57 +000041#define AREG0 "g6"
bellardfdbb4692006-06-14 17:32:25 +000042#endif
bellard74ccb342006-07-18 21:23:34 +000043#endif
ths522777b2007-05-08 23:30:44 +000044#elif defined(__s390__)
bellard79638562003-06-15 19:46:57 +000045#define AREG0 "r10"
ths522777b2007-05-08 23:30:44 +000046#elif defined(__alpha__)
bellard79638562003-06-15 19:46:57 +000047/* Note $15 is the frame pointer, so anything in op-i386.c that would
48 require a frame pointer, like alloca, would probably loose. */
49#define AREG0 "$15"
ths522777b2007-05-08 23:30:44 +000050#elif defined(__mc68000)
bellard38e584a2003-08-10 22:14:22 +000051#define AREG0 "%a5"
ths522777b2007-05-08 23:30:44 +000052#elif defined(__ia64__)
bellardb8076a72005-04-07 22:20:31 +000053#define AREG0 "r7"
ths522777b2007-05-08 23:30:44 +000054#else
55#error unsupported CPU
bellard79638562003-06-15 19:46:57 +000056#endif
57
Blue Swirl3e457172011-07-13 12:44:15 +000058register CPUState *env asm(AREG0);
59
bellard67867302003-11-23 17:05:30 +000060#endif /* !defined(__DYNGEN_EXEC_H__) */