diff options
| author | Leon Alrae | 2015-01-29 17:15:00 +0100 |
|---|---|---|
| committer | Leon Alrae | 2015-03-18 10:58:15 +0100 |
| commit | a5f533909e746ca6e534b232fb42c9c6fd81b468 (patch) | |
| tree | 1062b77fd414f2ac75b6f3819127b8e2c28de404 /scripts | |
| parent | target-mips: fix CP0.BadVAddr by stopping translation on Address Error (diff) | |
| download | qemu-a5f533909e746ca6e534b232fb42c9c6fd81b468.tar.gz qemu-a5f533909e746ca6e534b232fb42c9c6fd81b468.tar.xz qemu-a5f533909e746ca6e534b232fb42c9c6fd81b468.zip | |
target-mips: fix hflags modified in delay / forbidden slot
All instructions which may change hflags terminate tb. However, this doesn't
work if such an instruction is placed in delay or forbidden slot.
gen_branch() clears MIPS_HFLAG_BMASK in ctx->hflags and then generates code
to overwrite hflags with ctx->hflags, consequently we loose any execution-time
hflags modifications. For example, in the following scenario hflag related to
Status.CU1 will not be updated:
/* Set Status.CU1 in delay slot */
mfc0 $24, $12, 0
lui $25, 0x2000
or $25, $25, $24
b check_Status_CU1
mtc0 $25, $12, 0
With this change we clear MIPS_HFLAG_BMASK in execution-time hflags if
instruction in delay or forbidden slot wants to terminate tb for some reason
(i.e. ctx->bstate != BS_NONE).
Also, die early and loudly if "unknown branch" is encountered as this should
never happen.
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
