OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [sim/] [ppc/] [os_emul.h] - Diff between revs 24 and 157

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 157
/*  This file is part of the program psim.
/*  This file is part of the program psim.
 
 
    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
 
 
    This program is free software; you can redistribute it and/or modify
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    (at your option) any later version.
 
 
    This program is distributed in the hope that it will be useful,
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    GNU General Public License for more details.
 
 
    You should have received a copy of the GNU General Public License
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 
    */
    */
 
 
 
 
#ifndef _OS_EMUL_H_
#ifndef _OS_EMUL_H_
#define _OS_EMUL_H_
#define _OS_EMUL_H_
 
 
typedef struct _os_emul os_emul;
typedef struct _os_emul os_emul;
 
 
INLINE_OS_EMUL\
INLINE_OS_EMUL\
(os_emul *) os_emul_create
(os_emul *) os_emul_create
(const char *file_name,
(const char *file_name,
 device *root);
 device *root);
 
 
INLINE_OS_EMUL\
INLINE_OS_EMUL\
(void) os_emul_init
(void) os_emul_init
(os_emul *emulation,
(os_emul *emulation,
 int nr_cpus);
 int nr_cpus);
 
 
 
 
/* System-call emulation - for user code.  Instead of trapping system
/* System-call emulation - for user code.  Instead of trapping system
   calls to kernel mode, the simulator emulates the kernels behavour */
   calls to kernel mode, the simulator emulates the kernels behavour */
 
 
INLINE_OS_EMUL\
INLINE_OS_EMUL\
(void) os_emul_system_call
(void) os_emul_system_call
(cpu *processor,
(cpu *processor,
 unsigned_word cia);
 unsigned_word cia);
 
 
 
 
/* Instruction emulation - for kernel code.  Extra (normally illegal)
/* Instruction emulation - for kernel code.  Extra (normally illegal)
   instructions are added to the instruction table that when executed
   instructions are added to the instruction table that when executed
   call this emulation function. The instruction call emulator should
   call this emulation function. The instruction call emulator should
   verify the address that the instruction appears before emulating
   verify the address that the instruction appears before emulating
   the required behavour.  If the verification fails, a zero value
   the required behavour.  If the verification fails, a zero value
   should be returned (indicating instruction illegal). */
   should be returned (indicating instruction illegal). */
 
 
INLINE_OS_EMUL\
INLINE_OS_EMUL\
(int) os_emul_instruction_call
(int) os_emul_instruction_call
(cpu *processor,
(cpu *processor,
 unsigned_word cia,
 unsigned_word cia,
 unsigned_word ra);
 unsigned_word ra);
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.