Received: from eggs.gnu.org ([2001:4830:134:3::10]:36197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqKAX-00059D-20 for qemu-devel@nongnu.org; Thu, 16 Aug 2018 11:26:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqKAP-0008CC-5I for qemu-devel@nongnu.org; Thu, 16 Aug 2018 11:26:34 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:41080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fqKAO-0008Ag-H2 for qemu-devel@nongnu.org; Thu, 16 Aug 2018 11:26:28 -0400 Received: by mail-pg1-x544.google.com with SMTP id z8-v6so2218094pgu.8 for ; Thu, 16 Aug 2018 08:26:26 -0700 (PDT) References: <20180816120533.6587-1-rka@sysgo.com> From: Richard Henderson Message-ID: Date: Thu, 16 Aug 2018 08:26:22 -0700 MIME-Version: 1.0 In-Reply-To: <20180816120533.6587-1-rka@sysgo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] target/arm: crash on conditional instr in it block List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roman Kapl Cc: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org On 08/16/2018 05:05 AM, Roman Kapl wrote: > If an instruction is conditional (like CBZ) and it is executed conditionally > (using the ITx instruction), a jump to undefined label is generated. > CBZ in IT block is an unpredictable behavior, and honouring the condition code > is allowed by the spec in this case (constrained unpredictable, ARMv8, section > K1.1.7). > > Fix the 'skip on condtion' code to create a new label only if it does not > already exist. Previously multiple labels were created, but only the last one of > them was set. > > Signed-off-by: Roman Kapl > --- > v1 -> v2 > Split arm_conditional_skip into arm_gen_condlabel and arm_skip_unless to > a) cover all usages > b) do not force callers to ^1 the condition > > Add note about CBZ in IT block to the commit message. > > target/arm/translate.c | 35 +++++++++++++++++++++-------------- > 1 file changed, 21 insertions(+), 14 deletions(-) Reviewed-by: Richard Henderson r~