target/xtensa: fix return value of read/write simcalls
commit347ec03093f9668a379ef6b7fa1feb332fff039c
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 12 May 2017 19:05:23 +0000 (12 12:05 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 6 Jun 2017 09:34:04 +0000 (6 02:34 -0700)
treef337050aab9791c9d5f5bdf32eb8d86bea367b36
parent30c2afd151cbc38c012f7b441088980807183da6
target/xtensa: fix return value of read/write simcalls

Return value of read/write simcalls is not calculated correctly in case
of operations crossing page boundary and in case of short reads/writes.
Read and write simcalls should return the size of data actually
read/written or -1 in case of error.

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
target/xtensa/xtensa-semi.c