Revision eb20c1c6 target-ppc/mem_helper.c

b/target-ppc/mem_helper.c
252 252

  
253 253
#undef HI_IDX
254 254
#undef LO_IDX
255

  
256
/*****************************************************************************/
257
/* Softmmu support */
258
#if !defined(CONFIG_USER_ONLY)
259

  
260
#define MMUSUFFIX _mmu
261

  
262
#define SHIFT 0
263
#include "exec/softmmu_template.h"
264

  
265
#define SHIFT 1
266
#include "exec/softmmu_template.h"
267

  
268
#define SHIFT 2
269
#include "exec/softmmu_template.h"
270

  
271
#define SHIFT 3
272
#include "exec/softmmu_template.h"
273

  
274
/* try to fill the TLB and return an exception if error. If retaddr is
275
   NULL, it means that the function was called in C code (i.e. not
276
   from generated code or from helper.c) */
277
/* XXX: fix it to restore all registers */
278
void tlb_fill(CPUPPCState *env, target_ulong addr, int is_write, int mmu_idx,
279
              uintptr_t retaddr)
280
{
281
    int ret;
282

  
283
    ret = cpu_ppc_handle_mmu_fault(env, addr, is_write, mmu_idx);
284
    if (unlikely(ret != 0)) {
285
        if (likely(retaddr)) {
286
            /* now we have a real cpu fault */
287
            cpu_restore_state(env, retaddr);
288
        }
289
        helper_raise_exception_err(env, env->exception_index, env->error_code);
290
    }
291
}
292
#endif /* !CONFIG_USER_ONLY */

Also available in: Unified diff