summary refs log tree commit diff stats
path: root/hw/display
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2015-07-05 22:37:18 +0200
committerAurelien Jarno <aurelien@aurel32.net>2015-09-13 23:08:51 +0200
commit577601616dea10db10a716de1be448f8564076f4 (patch)
tree6b493b6120f0481fd2b03801456d1382d4cc9114 /hw/display
parenteb6ca2b4a69325e95526bc0f2897791df04e44dc (diff)
downloadfocaccia-qemu-577601616dea10db10a716de1be448f8564076f4.tar.gz
focaccia-qemu-577601616dea10db10a716de1be448f8564076f4.zip
target-sh4: improve shld instruction
The SH4 shld 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 'hw/display')
0 files changed, 0 insertions, 0 deletions