target-s390x: fix CC computation for LOAD POSITIVE instructions
commit2aaa1940684a3bf2b381fd2a8ff26c287a05109d
authorAurelien Jarno <aurelien@aurel32.net>
Mon, 18 May 2015 13:39:58 +0000 (18 15:39 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 4 Jun 2015 23:37:57 +0000 (5 01:37 +0200)
treead7327d81507bfc874f51890710f33dc812cb593
parentee0d0be16819896cc6c8018cbe171a632b61489c
target-s390x: fix CC computation for LOAD POSITIVE instructions

LOAD POSITIVE instructions (LPR, LPGR and LPGFR) set the following
condition code:
  0: Result zero; no overflow
  1: --
  2: Result greater than zero; no overflow
  3: Overflow

The current code wrongly returns 1 instead of 2 in case of a result
greater than 0. This patches fixes that. This fixes the marshalling of
the value '0L' in Python.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x/cc_helper.c