Revision 36f69651 target-ppc/op_helper_mem.h

b/target-ppc/op_helper_mem.h
242 242
}
243 243
#endif
244 244

  
245
/* Instruction cache invalidation helper */
246
void glue(do_icbi, MEMSUFFIX) (void)
247
{
248
    uint32_t tmp;
249
    /* Invalidate one cache line :
250
     * PowerPC specification says this is to be treated like a load
251
     * (not a fetch) by the MMU. To be sure it will be so,
252
     * do the load "by hand".
253
     */
254
    tmp = glue(ldl, MEMSUFFIX)((uint32_t)T0);
255
    T0 &= ~(ICACHE_LINE_SIZE - 1);
256
    tb_invalidate_page_range((uint32_t)T0, (uint32_t)(T0 + ICACHE_LINE_SIZE));
257
}
258

  
259
#if defined(TARGET_PPC64)
260
void glue(do_icbi_64, MEMSUFFIX) (void)
261
{
262
    uint64_t tmp;
263
    /* Invalidate one cache line :
264
     * PowerPC specification says this is to be treated like a load
265
     * (not a fetch) by the MMU. To be sure it will be so,
266
     * do the load "by hand".
267
     */
268
    tmp = glue(ldq, MEMSUFFIX)((uint64_t)T0);
269
    T0 &= ~(ICACHE_LINE_SIZE - 1);
270
    tb_invalidate_page_range((uint64_t)T0, (uint64_t)(T0 + ICACHE_LINE_SIZE));
271
}
272
#endif
273

  
245 274
/* PPC 601 specific instructions (POWER bridge) */
246 275
// XXX: to be tested
247 276
void glue(do_POWER_lscbx, MEMSUFFIX) (int dest, int ra, int rb)

Also available in: Unified diff