Revision 34ae7b51 target-mips/translate.c
b/target-mips/translate.c | ||
---|---|---|
5648 | 5648 |
gen_ldst(ctx, op, rt, rs, imm); |
5649 | 5649 |
break; |
5650 | 5650 |
case OPC_CACHE: |
5651 |
/* Treat as a noop */ |
|
5652 |
break; |
|
5651 |
/* FIXME: This works around self-modifying code, but only |
|
5652 |
if the guest OS handles it properly, and if there's no |
|
5653 |
such code executed in uncached space. */ |
|
5654 |
if (!(rt & 0x3)) |
|
5655 |
switch ((rt >> 2) & 0x7) { |
|
5656 |
case 4: |
|
5657 |
GEN_LOAD_REG_TN(T0, rs); |
|
5658 |
GEN_LOAD_IMM_TN(T1, imm); |
|
5659 |
gen_op_flush_icache_range(); |
|
5660 |
break; |
|
5661 |
case 2: |
|
5662 |
case 1: |
|
5663 |
case 0: |
|
5664 |
/* Can be very inefficient. */ |
|
5665 |
gen_op_flush_icache_all(); |
|
5666 |
break; |
|
5667 |
default: |
|
5668 |
break; |
|
5669 |
} |
|
5670 |
break; |
|
5653 | 5671 |
case OPC_PREF: |
5654 | 5672 |
/* Treat as a noop */ |
5655 | 5673 |
break; |
Also available in: Unified diff