Commit 3f5dcc340c1e4fa8a49066e30cf980bafdb3ecf4

Authored by bellard
1 parent f09936ac

PowerPC merge (Jocelyn Mayer)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@565 c046a42c-6fe2-441c-8c8c-71466251a162
exec-all.h
@@ -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)
541 int is_user, index; 541 int is_user, index;
542 542
543 index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); 543 index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
  544 +#if defined(TARGET_I386)
544 is_user = ((env->hflags & HF_CPL_MASK) == 3); 545 is_user = ((env->hflags & HF_CPL_MASK) == 3);
  546 +#elif defined (TARGET_PPC)
  547 + is_user = msr_pr;
  548 +#else
  549 +#error "Unimplemented !"
  550 +#endif
545 if (__builtin_expect(env->tlb_read[is_user][index].address != 551 if (__builtin_expect(env->tlb_read[is_user][index].address !=
546 (addr & TARGET_PAGE_MASK), 0)) { 552 (addr & TARGET_PAGE_MASK), 0)) {
547 ldub_code((void *)addr); 553 ldub_code((void *)addr);
translate-all.c
@@ -119,7 +119,7 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, @@ -119,7 +119,7 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb,
119 gen_opc_buf, gen_opparam_buf); 119 gen_opc_buf, gen_opparam_buf);
120 *gen_code_size_ptr = gen_code_size; 120 *gen_code_size_ptr = gen_code_size;
121 #ifdef DEBUG_DISAS 121 #ifdef DEBUG_DISAS
122 - if (loglevel) { 122 + if (loglevel && 0) {
123 fprintf(logfile, "OUT: [size=%d]\n", *gen_code_size_ptr); 123 fprintf(logfile, "OUT: [size=%d]\n", *gen_code_size_ptr);
124 disas(logfile, gen_code_buf, *gen_code_size_ptr, 1, 0); 124 disas(logfile, gen_code_buf, *gen_code_size_ptr, 1, 0);
125 fprintf(logfile, "\n"); 125 fprintf(logfile, "\n");
@@ -203,7 +203,6 @@ int cpu_restore_state(TranslationBlock *tb, @@ -203,7 +203,6 @@ int cpu_restore_state(TranslationBlock *tb,
203 case INDEX_op_ ## op ## _raw 203 case INDEX_op_ ## op ## _raw
204 #else 204 #else
205 #define CASE3(op)\ 205 #define CASE3(op)\
206 - case INDEX_op_ ## op ## _raw:\  
207 case INDEX_op_ ## op ## _user:\ 206 case INDEX_op_ ## op ## _user:\
208 case INDEX_op_ ## op ## _kernel 207 case INDEX_op_ ## op ## _kernel
209 #endif 208 #endif
@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 #define KERNEL_LOAD_ADDR 0x00100000 85 #define KERNEL_LOAD_ADDR 0x00100000
86 #elif defined (TARGET_PPC) 86 #elif defined (TARGET_PPC)
87 //#define USE_OPEN_FIRMWARE 87 //#define USE_OPEN_FIRMWARE
88 -#if defined (USE_OPEN_FIRMWARE) 88 +#if !defined (USE_OPEN_FIRMWARE)
89 #define KERNEL_LOAD_ADDR 0x01000000 89 #define KERNEL_LOAD_ADDR 0x01000000
90 #define KERNEL_STACK_ADDR 0x01200000 90 #define KERNEL_STACK_ADDR 0x01200000
91 #else 91 #else