On 2017-05-24 12:22, Richard Henderson wrote:
> (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.

It was done for the logical ops assuming the instruction has the
corresponding byte set to 0, as in that case it matches the length
and is passed directly as an argument to the helper.

> (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.
> 
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
>  target/s390x/helper.h     |   2 +-
>  target/s390x/mem_helper.c | 135 
> +++++++++++++++++++++++++---------------------
>  target/s390x/translate.c  |   8 +--
>  3 files changed, 78 insertions(+), 67 deletions(-)

Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net

Reply via email to