root / target-alpha / exec.h @ cbeb0857
History | View | Annotate | Download (2.2 kB)
1 | 4c9649a9 | j_mayer | /*
|
---|---|---|---|
2 | 4c9649a9 | j_mayer | * Alpha emulation cpu run-time definitions for qemu.
|
3 | 4c9649a9 | j_mayer | *
|
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 | 4c9649a9 | j_mayer | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 | #if TARGET_LONG_BITS > HOST_LONG_BITS
|
33 | 4c9649a9 | j_mayer | |
34 | 4c9649a9 | j_mayer | /* no registers can be used */
|
35 | 4c9649a9 | j_mayer | #define T0 (env->t0)
|
36 | 4c9649a9 | j_mayer | #define T1 (env->t1)
|
37 | 4c9649a9 | j_mayer | #define T2 (env->t2)
|
38 | 4c9649a9 | j_mayer | |
39 | 4c9649a9 | j_mayer | #else
|
40 | 4c9649a9 | j_mayer | |
41 | 4c9649a9 | j_mayer | register uint64_t T0 asm(AREG1); |
42 | 4c9649a9 | j_mayer | register uint64_t T1 asm(AREG2); |
43 | 4c9649a9 | j_mayer | register uint64_t T2 asm(AREG3); |
44 | 4c9649a9 | j_mayer | |
45 | 4c9649a9 | j_mayer | #endif /* TARGET_LONG_BITS > HOST_LONG_BITS */ |
46 | 4c9649a9 | j_mayer | |
47 | 4c9649a9 | j_mayer | #define PARAM(n) ((uint64_t)PARAM##n) |
48 | 4c9649a9 | j_mayer | #define SPARAM(n) ((int32_t)PARAM##n) |
49 | 4c9649a9 | j_mayer | #define FT0 (env->ft0)
|
50 | 4c9649a9 | j_mayer | #define FT1 (env->ft1)
|
51 | 4c9649a9 | j_mayer | #define FT2 (env->ft2)
|
52 | 4c9649a9 | j_mayer | #define FP_STATUS (env->fp_status)
|
53 | 4c9649a9 | j_mayer | |
54 | 4c9649a9 | j_mayer | #if defined (DEBUG_OP)
|
55 | 4c9649a9 | j_mayer | #define RETURN() __asm__ __volatile__("nop" : : : "memory"); |
56 | 4c9649a9 | j_mayer | #else
|
57 | 4c9649a9 | j_mayer | #define RETURN() __asm__ __volatile__("" : : : "memory"); |
58 | 4c9649a9 | j_mayer | #endif
|
59 | 4c9649a9 | j_mayer | |
60 | 4c9649a9 | j_mayer | #include "cpu.h" |
61 | 4c9649a9 | j_mayer | #include "exec-all.h" |
62 | 4c9649a9 | j_mayer | |
63 | 4c9649a9 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
64 | 4c9649a9 | j_mayer | #include "softmmu_exec.h" |
65 | 4c9649a9 | j_mayer | #endif /* !defined(CONFIG_USER_ONLY) */ |
66 | 4c9649a9 | j_mayer | |
67 | 4c9649a9 | j_mayer | static inline void env_to_regs(void) |
68 | 4c9649a9 | j_mayer | { |
69 | 4c9649a9 | j_mayer | } |
70 | 4c9649a9 | j_mayer | |
71 | 4c9649a9 | j_mayer | static inline void regs_to_env(void) |
72 | 4c9649a9 | j_mayer | { |
73 | 4c9649a9 | j_mayer | } |
74 | 4c9649a9 | j_mayer | |
75 | 4c9649a9 | j_mayer | int cpu_alpha_handle_mmu_fault (CPUState *env, uint64_t address, int rw, |
76 | 4c9649a9 | j_mayer | int is_user, int is_softmmu); |
77 | 4c9649a9 | j_mayer | int cpu_alpha_mfpr (CPUState *env, int iprn, uint64_t *valp); |
78 | 4c9649a9 | j_mayer | int cpu_alpha_mtpr (CPUState *env, int iprn, uint64_t val, uint64_t *oldvalp); |
79 | 4c9649a9 | j_mayer | |
80 | 4c9649a9 | j_mayer | void do_interrupt (CPUState *env);
|
81 | 4c9649a9 | j_mayer | |
82 | 4c9649a9 | j_mayer | #endif /* !defined (__ALPHA_EXEC_H__) */ |