File:  [Qemu by Fabrice Bellard] / qemu / target-ppc / exec.h
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:39:29 2018 UTC (3 years, 7 months ago) by root
Branches: qemu, MAIN
CVS tags: qemu0082, qemu0081, qemu0080, HEAD
qemu 0.8.0

    1: /*
    2:  *  PowerPC emulation definitions for qemu.
    3:  * 
    4:  *  Copyright (c) 2003-2005 Jocelyn Mayer
    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
   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
   19:  */
   20: #if !defined (__PPC_H__)
   21: #define __PPC_H__
   22: 
   23: #include "config.h"
   24: 
   25: #include "dyngen-exec.h"
   26: 
   27: #define TARGET_LONG_BITS 32
   28: 
   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);
   33: 
   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)
   39: 
   40: #if defined (DEBUG_OP)
   41: #define RETURN() __asm__ __volatile__("nop");
   42: #else
   43: #define RETURN() __asm__ __volatile__("");
   44: #endif
   45: 
   46: #include "cpu.h"
   47: #include "exec-all.h"
   48: 
   49: static inline uint32_t rotl (uint32_t i, int n)
   50: {
   51:     return ((i << n) | (i >> (32 - n)));
   52: }
   53: 
   54: #if !defined(CONFIG_USER_ONLY)
   55: #include "softmmu_exec.h"
   56: #endif /* !defined(CONFIG_USER_ONLY) */
   57: 
   58: void do_raise_exception_err (uint32_t exception, int error_code);
   59: void do_raise_exception (uint32_t exception);
   60: 
   61: void do_sraw(void);
   62: 
   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);
   73: 
   74: void do_check_reservation (void);
   75: void do_icbi (void);
   76: void do_tlbia (void);
   77: void do_tlbie (void);
   78: 
   79: static inline void env_to_regs(void)
   80: {
   81: }
   82: 
   83: static inline void regs_to_env(void)
   84: {
   85: }
   86: 
   87: int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw,
   88:                               int is_user, int is_softmmu);
   89: 
   90: #endif /* !defined (__PPC_H__) */

unix.superglobalmegacorp.com