Received: from eggs.gnu.org ([2001:4830:134:3::10]:58272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwfcL-00037g-4v for qemu-devel@nongnu.org; Sun, 24 May 2015 19:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwfcJ-00080v-9k for qemu-devel@nongnu.org; Sun, 24 May 2015 19:47:41 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:101::1]:40628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwfcJ-000807-3n for qemu-devel@nongnu.org; Sun, 24 May 2015 19:47:39 -0400 From: Aurelien Jarno Date: Mon, 25 May 2015 01:47:22 +0200 Message-Id: <1432511251-22515-2-git-send-email-aurelien@aurel32.net> In-Reply-To: <1432511251-22515-1-git-send-email-aurelien@aurel32.net> References: <1432511251-22515-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH 01/10] target-s390x: fix PSW value on dynamical exception from helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf , Aurelien Jarno , Richard Henderson runtime_exception computes the psw.addr value using the actual exception address and the instruction length computed by calling the get_ilen function. However as explained above the get_ilen code, it returns the actual instruction length, and not the ILC. Therefore there is no need to multiply the value by 2. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index 3ec7268..b375ab7 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -61,7 +61,7 @@ void QEMU_NORETURN runtime_exception(CPUS390XState *env, int excp, /* Advance past the insn. */ t = cpu_ldub_code(env, env->psw.addr); env->int_pgm_ilen = t = get_ilen(t); - env->psw.addr += 2 * t; + env->psw.addr += t; cpu_loop_exit(cs); } -- 2.1.4