PCI SCSI HBA emulation.
[qemu/mini2440.git] / target-ppc / exec.h
blob3ef0968bc33ce716394c957b937a4a17ad58a9c2
1 /*
2 * PowerPC emulation definitions for qemu.
3 *
4 * Copyright (c) 2003-2005 Jocelyn Mayer
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, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #if !defined (__PPC_H__)
21 #define __PPC_H__
23 #include "config.h"
25 #include "dyngen-exec.h"
27 #define TARGET_LONG_BITS 32
29 register struct CPUPPCState *env asm(AREG0);
30 register uint32_t T0 asm(AREG1);
31 register uint32_t T1 asm(AREG2);
32 register uint32_t T2 asm(AREG3);
34 #define PARAM(n) ((uint32_t)PARAM##n)
35 #define SPARAM(n) ((int32_t)PARAM##n)
36 #define FT0 (env->ft0)
37 #define FT1 (env->ft1)
38 #define FT2 (env->ft2)
40 #if defined (DEBUG_OP)
41 #define RETURN() __asm__ __volatile__("nop");
42 #else
43 #define RETURN() __asm__ __volatile__("");
44 #endif
46 #include "cpu.h"
47 #include "exec-all.h"
49 static inline uint32_t rotl (uint32_t i, int n)
51 return ((i << n) | (i >> (32 - n)));
54 #if !defined(CONFIG_USER_ONLY)
55 #include "softmmu_exec.h"
56 #endif /* !defined(CONFIG_USER_ONLY) */
58 void do_raise_exception_err (uint32_t exception, int error_code);
59 void do_raise_exception (uint32_t exception);
61 void do_sraw(void);
63 void do_fctiw (void);
64 void do_fctiwz (void);
65 void do_fnmadd (void);
66 void do_fnmsub (void);
67 void do_fsqrt (void);
68 void do_fres (void);
69 void do_frsqrte (void);
70 void do_fsel (void);
71 void do_fcmpu (void);
72 void do_fcmpo (void);
74 void do_check_reservation (void);
75 void do_icbi (void);
76 void do_tlbia (void);
77 void do_tlbie (void);
79 static inline void env_to_regs(void)
83 static inline void regs_to_env(void)
87 int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw,
88 int is_user, int is_softmmu);
90 #endif /* !defined (__PPC_H__) */