target/sh4: move DELAY_SLOT_TRUE flag into a separate global
commit47b9f4d5a4013938134ca678c338906e798a61d7
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:29 +0000 (13 11:17 +0200)
treeeb14ff757bc9eb0bbd345ba21d29fa2d41a244e5
parent24b09d9d8ba589402f9c8e0d8d36bcf5c4a933da
target/sh4: move DELAY_SLOT_TRUE flag into a separate global

Instead of using one bit of the env flags to store the condition of the
next delay slot, use a separate global. It simplifies reading and
writing the flags variable and also removes some confusion between
ctx->envflags and env->flags.

Note that the global is first transfered to a temp in order to be
able to discard the global before the brcond.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target/sh4/cpu.h
target/sh4/helper.c
target/sh4/translate.c