target-z80: Fix handling of block in/out operations
commit95eeef0f1ea34205995bfb862b07600bfcc4c6ce
authorJuha Riihimäki <juha.riihimaki@nokia.com>
Sat, 20 Jun 2009 16:43:03 +0000 (20 17:43 +0100)
committerStuart Brady <stuart.brady@gmail.com>
Sat, 20 Jun 2009 16:43:03 +0000 (20 17:43 +0100)
tree2f4391bc8dd7eb6b490c3ea9cd588a443894d427
parent9bbc29842697ba5a9a2bcaad22ced5ee0bb851ef
target-z80: Fix handling of block in/out operations

This patch fixes BC register handling for block in/out operations; previous
code caused the value to underflow the 16bit range and eventually caused an
invalid memory access in the generic QEMU i/o code.  The patch fixes also
Z, C and H flag behavior for block out operations. This further fixes Z
flag behavior for block in operations but still provides faulty behavior
for other flags.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
target-z80/op_helper.c