aboutsummaryrefslogtreecommitdiff
path: root/target-sh4/helper.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2015-07-05 22:39:03 +0200
committerAurelien Jarno <aurelien@aurel32.net>2015-09-13 23:08:51 +0200
commitbe654c83608eaba199ed45444debf2dd46a88fe6 (patch)
treef28edfc65b7136ff1c660f7a0b98e82a234987ae /target-sh4/helper.c
parent577601616dea10db10a716de1be448f8564076f4 (diff)
downloadqemu-be654c83608eaba199ed45444debf2dd46a88fe6.zip
qemu-be654c83608eaba199ed45444debf2dd46a88fe6.tar.gz
qemu-be654c83608eaba199ed45444debf2dd46a88fe6.tar.bz2
target-sh4: improve shad instruction
The SH4 shad instruction can shift in both direction, depending on the sign of the shift. This is currently implemented using branches, which is not really efficient and prevents the optimizer to do its job. In practice it is often used with a constant loaded in a register just before. Simplify the implementation by computing both the value shifted to the left and to the right, and then selecting the correct one with a movcond. As with a negative value the shift amount can go up to 32 which is undefined, we shift the value in two steps. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-sh4/helper.c')
0 files changed, 0 insertions, 0 deletions