target/sh4: split ctx->flags into ctx->tbflags and ctx->envflags
commita6215749dc299214642b3dfd690227243606331f
authorAurelien Jarno <aurelien@aurel32.net>
Mon, 1 May 2017 21:20:43 +0000 (1 23:20 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 13 May 2017 09:17:28 +0000 (13 11:17 +0200)
tree120e272d526be716d467a09198faed498f91e660
parentecc1f5adeec4e3324d1b695a7c54e3967c526949
target/sh4: split ctx->flags into ctx->tbflags and ctx->envflags

There is a confusion (and not only in the SH4 target) between tb->flags,
env->flags and ctx->flags. To avoid it, split ctx->flags into
ctx->tbflags and ctx->envflags. ctx->tbflags stays unchanged during the
whole TB translation, while ctx->envflags evolves and is kept in sync
with env->flags using TCG instructions. ctx->envflags now only contains
the part that of env->flags that is contained in the TB state, i.e. the
DELAY_SLOT* flags.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target/sh4/translate.c