root / target-ppc / exec.h @ 480c1cdb
History | View | Annotate | Download (2.3 kB)
1 | 79aceca5 | bellard | /*
|
---|---|---|---|
2 | 3fc6c082 | bellard | * PowerPC emulation definitions for qemu.
|
3 | 79aceca5 | bellard | *
|
4 | 3fc6c082 | bellard | * Copyright (c) 2003-2005 Jocelyn Mayer
|
5 | 79aceca5 | bellard | *
|
6 | 79aceca5 | bellard | * This library is free software; you can redistribute it and/or
|
7 | 79aceca5 | bellard | * modify it under the terms of the GNU Lesser General Public
|
8 | 79aceca5 | bellard | * License as published by the Free Software Foundation; either
|
9 | 79aceca5 | bellard | * version 2 of the License, or (at your option) any later version.
|
10 | 79aceca5 | bellard | *
|
11 | 79aceca5 | bellard | * This library is distributed in the hope that it will be useful,
|
12 | 79aceca5 | bellard | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 79aceca5 | bellard | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 79aceca5 | bellard | * Lesser General Public License for more details.
|
15 | 79aceca5 | bellard | *
|
16 | 79aceca5 | bellard | * You should have received a copy of the GNU Lesser General Public
|
17 | 79aceca5 | bellard | * License along with this library; if not, write to the Free Software
|
18 | 79aceca5 | bellard | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19 | 79aceca5 | bellard | */
|
20 | 79aceca5 | bellard | #if !defined (__PPC_H__)
|
21 | 79aceca5 | bellard | #define __PPC_H__
|
22 | 79aceca5 | bellard | |
23 | fdabc366 | bellard | #include "config.h" |
24 | fdabc366 | bellard | |
25 | 79aceca5 | bellard | #include "dyngen-exec.h" |
26 | 79aceca5 | bellard | |
27 | fdabc366 | bellard | #define TARGET_LONG_BITS 32 |
28 | fdabc366 | bellard | |
29 | 79aceca5 | bellard | register struct CPUPPCState *env asm(AREG0); |
30 | 79aceca5 | bellard | register uint32_t T0 asm(AREG1); |
31 | 79aceca5 | bellard | register uint32_t T1 asm(AREG2); |
32 | 79aceca5 | bellard | register uint32_t T2 asm(AREG3); |
33 | 79aceca5 | bellard | |
34 | 79aceca5 | bellard | #define PARAM(n) ((uint32_t)PARAM##n) |
35 | 79aceca5 | bellard | #define SPARAM(n) ((int32_t)PARAM##n) |
36 | fb0eaffc | bellard | #define FT0 (env->ft0)
|
37 | fb0eaffc | bellard | #define FT1 (env->ft1)
|
38 | fb0eaffc | bellard | #define FT2 (env->ft2)
|
39 | 79aceca5 | bellard | |
40 | a541f297 | bellard | #if defined (DEBUG_OP)
|
41 | a541f297 | bellard | #define RETURN() __asm__ __volatile__("nop"); |
42 | a541f297 | bellard | #else
|
43 | 79aceca5 | bellard | #define RETURN() __asm__ __volatile__(""); |
44 | a541f297 | bellard | #endif
|
45 | 79aceca5 | bellard | |
46 | 79aceca5 | bellard | #include "cpu.h" |
47 | 79aceca5 | bellard | #include "exec-all.h" |
48 | 79aceca5 | bellard | |
49 | 9a64fbe4 | bellard | static inline uint32_t rotl (uint32_t i, int n) |
50 | 79aceca5 | bellard | { |
51 | 9a64fbe4 | bellard | return ((i << n) | (i >> (32 - n))); |
52 | 79aceca5 | bellard | } |
53 | 79aceca5 | bellard | |
54 | 9a64fbe4 | bellard | #if !defined(CONFIG_USER_ONLY)
|
55 | a9049a07 | bellard | #include "softmmu_exec.h" |
56 | 9a64fbe4 | bellard | #endif /* !defined(CONFIG_USER_ONLY) */ |
57 | 79aceca5 | bellard | |
58 | 9fddaa0c | bellard | void do_raise_exception_err (uint32_t exception, int error_code); |
59 | 9fddaa0c | bellard | void do_raise_exception (uint32_t exception);
|
60 | 79aceca5 | bellard | |
61 | 9a64fbe4 | bellard | void do_sraw(void); |
62 | 9a64fbe4 | bellard | |
63 | 9a64fbe4 | bellard | void do_fctiw (void); |
64 | 9a64fbe4 | bellard | void do_fctiwz (void); |
65 | 4b3686fa | bellard | void do_fnmadd (void); |
66 | 4b3686fa | bellard | void do_fnmsub (void); |
67 | 9a64fbe4 | bellard | void do_fsqrt (void); |
68 | 9a64fbe4 | bellard | void do_fres (void); |
69 | 4ecc3190 | bellard | void do_frsqrte (void); |
70 | 9a64fbe4 | bellard | void do_fsel (void); |
71 | 9a64fbe4 | bellard | void do_fcmpu (void); |
72 | 9a64fbe4 | bellard | void do_fcmpo (void); |
73 | 79aceca5 | bellard | |
74 | 4b3686fa | bellard | void do_check_reservation (void); |
75 | fb0eaffc | bellard | void do_icbi (void); |
76 | 9a64fbe4 | bellard | void do_tlbia (void); |
77 | 9a64fbe4 | bellard | void do_tlbie (void); |
78 | 9a64fbe4 | bellard | |
79 | 0d1a29f9 | bellard | static inline void env_to_regs(void) |
80 | 0d1a29f9 | bellard | { |
81 | 0d1a29f9 | bellard | } |
82 | 0d1a29f9 | bellard | |
83 | 0d1a29f9 | bellard | static inline void regs_to_env(void) |
84 | 0d1a29f9 | bellard | { |
85 | 0d1a29f9 | bellard | } |
86 | 0d1a29f9 | bellard | |
87 | 0fa85d43 | bellard | int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw, |
88 | 0fa85d43 | bellard | int is_user, int is_softmmu); |
89 | 0fa85d43 | bellard | |
90 | 79aceca5 | bellard | #endif /* !defined (__PPC_H__) */ |