target/s390x: Fix some helper_ex problems
authorRichard Henderson <rth@twiddle.net>
Wed, 24 May 2017 18:49:53 +0000 (11:49 -0700)
committerRichard Henderson <rth@twiddle.net>
Tue, 6 Jun 2017 21:34:31 +0000 (14:34 -0700)
commit8350079329562e93d109607d03393153de582d4a
tree864bd14cde539d4e4a738201a4fc7182ca301f83
parentb90fb26bded72c28865e4fb257b5d3975f93b88b
target/s390x: Fix some helper_ex problems

(1) The OR of the low bits or R1 into INSN were not being done
consistently; it was forgotten along all but the SVC path.
(2) The setting of ILEN was wrong on SVC path for EXRL.
(3) The data load for ICM read too much.

Fix these by consolidating data load at the beginning, using
get_ilen to control the number of bytes loaded, and ORing in
the byte from R1.  Use extract64 from the full aligned insn
to extract arguments.

Pass in ILEN rather than RET as the more natural way to give
the required data along the SVC path.

Modify ENV->CC_OP directly rather than include it in the
functional interface.

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