Commit 3f5dcc34 authored by bellard's avatar bellard
Browse files

PowerPC merge (Jocelyn Mayer)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@565 c046a42c-6fe2-441c-8c8c-71466251a162
parent f09936ac
...@@ -541,7 +541,13 @@ static inline target_ulong get_phys_addr_code(CPUState *env, target_ulong addr) ...@@ -541,7 +541,13 @@ static inline target_ulong get_phys_addr_code(CPUState *env, target_ulong addr)
int is_user, index; int is_user, index;
index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
#if defined(TARGET_I386)
is_user = ((env->hflags & HF_CPL_MASK) == 3); is_user = ((env->hflags & HF_CPL_MASK) == 3);
#elif defined (TARGET_PPC)
is_user = msr_pr;
#else
#error "Unimplemented !"
#endif
if (__builtin_expect(env->tlb_read[is_user][index].address != if (__builtin_expect(env->tlb_read[is_user][index].address !=
(addr & TARGET_PAGE_MASK), 0)) { (addr & TARGET_PAGE_MASK), 0)) {
ldub_code((void *)addr); ldub_code((void *)addr);
......
...@@ -119,7 +119,7 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, ...@@ -119,7 +119,7 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb,
gen_opc_buf, gen_opparam_buf); gen_opc_buf, gen_opparam_buf);
*gen_code_size_ptr = gen_code_size; *gen_code_size_ptr = gen_code_size;
#ifdef DEBUG_DISAS #ifdef DEBUG_DISAS
if (loglevel) { if (loglevel && 0) {
fprintf(logfile, "OUT: [size=%d]\n", *gen_code_size_ptr); fprintf(logfile, "OUT: [size=%d]\n", *gen_code_size_ptr);
disas(logfile, gen_code_buf, *gen_code_size_ptr, 1, 0); disas(logfile, gen_code_buf, *gen_code_size_ptr, 1, 0);
fprintf(logfile, "\n"); fprintf(logfile, "\n");
...@@ -203,7 +203,6 @@ int cpu_restore_state(TranslationBlock *tb, ...@@ -203,7 +203,6 @@ int cpu_restore_state(TranslationBlock *tb,
case INDEX_op_ ## op ## _raw case INDEX_op_ ## op ## _raw
#else #else
#define CASE3(op)\ #define CASE3(op)\
case INDEX_op_ ## op ## _raw:\
case INDEX_op_ ## op ## _user:\ case INDEX_op_ ## op ## _user:\
case INDEX_op_ ## op ## _kernel case INDEX_op_ ## op ## _kernel
#endif #endif
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
#define KERNEL_LOAD_ADDR 0x00100000 #define KERNEL_LOAD_ADDR 0x00100000
#elif defined (TARGET_PPC) #elif defined (TARGET_PPC)
//#define USE_OPEN_FIRMWARE //#define USE_OPEN_FIRMWARE
#if defined (USE_OPEN_FIRMWARE) #if !defined (USE_OPEN_FIRMWARE)
#define KERNEL_LOAD_ADDR 0x01000000 #define KERNEL_LOAD_ADDR 0x01000000
#define KERNEL_STACK_ADDR 0x01200000 #define KERNEL_STACK_ADDR 0x01200000
#else #else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment