root / target-alpha / exec.h @ fad6cb1a
History | View | Annotate | Download (1.6 kB)
1 | 4c9649a9 | j_mayer | /*
|
---|---|---|---|
2 | 4c9649a9 | j_mayer | * Alpha emulation cpu run-time definitions for qemu.
|
3 | 5fafdf24 | ths | *
|
4 | 4c9649a9 | j_mayer | * Copyright (c) 2007 Jocelyn Mayer
|
5 | 4c9649a9 | j_mayer | *
|
6 | 4c9649a9 | j_mayer | * This library is free software; you can redistribute it and/or
|
7 | 4c9649a9 | j_mayer | * modify it under the terms of the GNU Lesser General Public
|
8 | 4c9649a9 | j_mayer | * License as published by the Free Software Foundation; either
|
9 | 4c9649a9 | j_mayer | * version 2 of the License, or (at your option) any later version.
|
10 | 4c9649a9 | j_mayer | *
|
11 | 4c9649a9 | j_mayer | * This library is distributed in the hope that it will be useful,
|
12 | 4c9649a9 | j_mayer | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 4c9649a9 | j_mayer | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 4c9649a9 | j_mayer | * Lesser General Public License for more details.
|
15 | 4c9649a9 | j_mayer | *
|
16 | 4c9649a9 | j_mayer | * You should have received a copy of the GNU Lesser General Public
|
17 | 4c9649a9 | j_mayer | * License along with this library; if not, write to the Free Software
|
18 | fad6cb1a | aurel32 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
|
19 | 4c9649a9 | j_mayer | */
|
20 | 4c9649a9 | j_mayer | |
21 | 4c9649a9 | j_mayer | #if !defined (__ALPHA_EXEC_H__)
|
22 | 4c9649a9 | j_mayer | #define __ALPHA_EXEC_H__
|
23 | 4c9649a9 | j_mayer | |
24 | 4c9649a9 | j_mayer | #include "config.h" |
25 | 4c9649a9 | j_mayer | |
26 | 4c9649a9 | j_mayer | #include "dyngen-exec.h" |
27 | 4c9649a9 | j_mayer | |
28 | 4c9649a9 | j_mayer | #define TARGET_LONG_BITS 64 |
29 | 4c9649a9 | j_mayer | |
30 | 4c9649a9 | j_mayer | register struct CPUAlphaState *env asm(AREG0); |
31 | 4c9649a9 | j_mayer | |
32 | 4c9649a9 | j_mayer | #define PARAM(n) ((uint64_t)PARAM##n) |
33 | 4c9649a9 | j_mayer | #define SPARAM(n) ((int32_t)PARAM##n) |
34 | 4c9649a9 | j_mayer | #define FP_STATUS (env->fp_status)
|
35 | 4c9649a9 | j_mayer | |
36 | 4c9649a9 | j_mayer | #include "cpu.h" |
37 | 4c9649a9 | j_mayer | #include "exec-all.h" |
38 | 4c9649a9 | j_mayer | |
39 | 4c9649a9 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
40 | 4c9649a9 | j_mayer | #include "softmmu_exec.h" |
41 | 4c9649a9 | j_mayer | #endif /* !defined(CONFIG_USER_ONLY) */ |
42 | 4c9649a9 | j_mayer | |
43 | f071b4d3 | j_mayer | static always_inline void env_to_regs(void) |
44 | 4c9649a9 | j_mayer | { |
45 | 4c9649a9 | j_mayer | } |
46 | 4c9649a9 | j_mayer | |
47 | f071b4d3 | j_mayer | static always_inline void regs_to_env(void) |
48 | 4c9649a9 | j_mayer | { |
49 | 4c9649a9 | j_mayer | } |
50 | 4c9649a9 | j_mayer | |
51 | f071b4d3 | j_mayer | static always_inline int cpu_halted(CPUState *env) { |
52 | bfed01fc | ths | if (!env->halted)
|
53 | bfed01fc | ths | return 0; |
54 | bfed01fc | ths | if (env->interrupt_request & CPU_INTERRUPT_HARD) {
|
55 | bfed01fc | ths | env->halted = 0;
|
56 | bfed01fc | ths | return 0; |
57 | bfed01fc | ths | } |
58 | bfed01fc | ths | return EXCP_HALTED;
|
59 | bfed01fc | ths | } |
60 | bfed01fc | ths | |
61 | 4c9649a9 | j_mayer | #endif /* !defined (__ALPHA_EXEC_H__) */ |