-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sparc emulation target (thanx to Thomas M. Ogrisegg)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@386 c046a42c-6fe2-441c-8c8c-71466251a162
- Loading branch information
bellard
committed
Sep 30, 2003
1 parent
2c0262a
commit 7a3f194
Showing
7 changed files
with
1,581 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
struct target_pt_regs { | ||
target_ulong psr; | ||
target_ulong pc; | ||
target_ulong npc; | ||
target_ulong y; | ||
target_ulong u_regs[16]; | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef CPU_SPARC_H | ||
#define CPU_SPARC_H | ||
|
||
#include <setjmp.h> | ||
#include "config.h" | ||
#include "cpu-defs.h" | ||
|
||
/*#define EXCP_INTERRUPT 0x100*/ | ||
|
||
|
||
#define PSR_NEG (1<<23) | ||
#define PSR_ZERO (1<<22) | ||
#define PSR_OVF (1<<21) | ||
#define PSR_CARRY (1<<20) | ||
|
||
typedef struct CPUSPARCState { | ||
uint32_t gregs[8]; /* general registers */ | ||
uint32_t *regwptr; /* pointer to current register window */ | ||
double *regfptr; /* floating point registers */ | ||
uint32_t pc; /* program counter */ | ||
uint32_t npc; /* next program counter */ | ||
uint32_t sp; /* stack pointer */ | ||
uint32_t y; /* multiply/divide register */ | ||
uint32_t psr; /* processor state register */ | ||
uint32_t T2; | ||
jmp_buf jmp_env; | ||
int user_mode_only; | ||
int exception_index; | ||
int interrupt_index; | ||
int interrupt_request; | ||
struct TranslationBlock *current_tb; | ||
void *opaque; | ||
} CPUSPARCState; | ||
|
||
CPUSPARCState *cpu_sparc_init(void); | ||
int cpu_sparc_exec(CPUSPARCState *s); | ||
int cpu_sparc_close(CPUSPARCState *s); | ||
|
||
struct siginfo; | ||
int cpu_sparc_signal_handler(int hostsignum, struct siginfo *info, void *puc); | ||
void cpu_sparc_dump_state(CPUSPARCState *env, FILE *f, int flags); | ||
|
||
#define TARGET_PAGE_BITS 13 | ||
#include "cpu-all.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef EXEC_SPARC_H | ||
#define EXEC_SPARC_H 1 | ||
#include "dyngen-exec.h" | ||
|
||
register struct CPUSPARCState *env asm(AREG0); | ||
register uint32_t T0 asm(AREG1); | ||
register uint32_t T1 asm(AREG2); | ||
register uint32_t T2 asm(AREG3); | ||
|
||
#include "cpu.h" | ||
#include "exec-all.h" | ||
|
||
void cpu_lock(void); | ||
void cpu_unlock(void); | ||
void cpu_loop_exit(void); | ||
#endif |
Oops, something went wrong.