From patchwork Tue Apr 27 17:16:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Fernando Fujita Pires X-Patchwork-Id: 427953 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4830478jao; Tue, 27 Apr 2021 10:30:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMSgpEp9nrLmuko3QZF9kXb3It9/u7P9wvHGzomQGYyC+K5x/aOqNYn2VndnvFt4HFmrz5 X-Received: by 2002:a05:600c:35cf:: with SMTP id r15mr5380613wmq.183.1619544633003; Tue, 27 Apr 2021 10:30:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619544633; cv=none; d=google.com; s=arc-20160816; b=FWh4trbKNIRnG7H988CcnXtDa3PqQLDJsoyay9bryddLoi6VTn1+2DxCQspwJNRbuw wLfIUkDUeefT4IQYwCjnK3qdaXlYZgLXq2ziqWdHIxF3PQDKA5w1ncBGILMd8RsRwn/D ewE75PQ2xu2X680JNV8MKgcJE6jXS10+bciX045G1O0hI/u+85nL50L2F0p4Cf0HrqfZ 88er/8+5YROKV89jZ9+E5gYEc6hKAaYUGjW4WRxpHja1GqTjbetKfkdjx+ueIt3sHYWe cM0H+GlQzF0SUHNES8e+7FMypJ1oWr4VGeJBAQOjf0xjOHDpnVar85amWOIwu1PMondV 7mMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=9Y9AxyUmmFGts0Bkm35WFg9H+vuXJQtEQLkOMkhWK6w=; b=DDt05RQG3S+LagsyK4FcZfgwi6LXG2GpYrfbc2U4rpVNkM1rg8fh/vZO+ddEfBDYLW VO9cuw7liUYygOL6uGV5X3Of1L923wmVKDAOa5D+QAbe5ZUdLeaJnvpXfAypvUZsaNKL mK85Q7LGhVa/gQwhnDtJ7fert9eGDu65Q0lO1TwQ3WMT3QrDF27p63dfE7Qs8zz375JI rpr/wrmOVtG1zLimC4J45zMZAZwFOEsj4fSD4uwSYIS/Bk/grCg5oHOt+LYDvyXjkmna Tx1J5oOT+TiVTNQezIvIOloX41zJnZVmJ5j8FWvWAX7ZwdWGIuyXOkzL6fivHvtH1KH8 MBPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c8si4944203wrn.169.2021.04.27.10.30.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Apr 2021 10:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:56926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbRXb-0001Yq-RH for patch@linaro.org; Tue, 27 Apr 2021 13:30:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbRLn-0001b1-4V; Tue, 27 Apr 2021 13:18:19 -0400 Received: from [201.28.113.2] (port=48284 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbRLl-00023I-Ld; Tue, 27 Apr 2021 13:18:18 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 27 Apr 2021 14:16:52 -0300 Received: from eldorado.org.br (unknown [10.10.70.45]) by power9a (Postfix) with ESMTP id D01C78013BA; Tue, 27 Apr 2021 14:16:52 -0300 (-03) From: Luis Pires To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Subject: [PATCH v2 05/15] target/ppc: Tidy exception vs exit_tb Date: Tue, 27 Apr 2021 14:16:39 -0300 Message-Id: <20210427171649.364699-6-luis.pires@eldorado.org.br> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210427171649.364699-1-luis.pires@eldorado.org.br> References: <20210427171649.364699-1-luis.pires@eldorado.org.br> MIME-Version: 1.0 X-OriginalArrivalTime: 27 Apr 2021 17:16:53.0011 (UTC) FILETIME=[1DF89E30:01D73B89] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass client-ip=201.28.113.2; envelope-from=luis.pires@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.henderson@linaro.org, f4bug@amsat.org, lagarcia@br.ibm.com, bruno.larsen@eldorado.org.br, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson We do not need to emit an exit_tb after an exception, as the latter will exit via longjmp. Signed-off-by: Richard Henderson --- target/ppc/translate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 46de2dab27..b18ad8ec2c 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -3744,8 +3744,9 @@ static void gen_lookup_and_goto_ptr(DisasContext *ctx) } else if (sse & (CPU_SINGLE_STEP | CPU_BRANCH_STEP)) { uint32_t excp = gen_prep_dbgex(ctx); gen_exception(ctx, excp); + } else { + tcg_gen_exit_tb(NULL, 0); } - tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); } @@ -8101,9 +8102,10 @@ static void ppc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) } else if (ctx->exception != POWERPC_EXCP_BRANCH) { if (unlikely(ctx->base.singlestep_enabled)) { gen_debug_exception(ctx); + } else { + /* Generate the return instruction */ + tcg_gen_exit_tb(NULL, 0); } - /* Generate the return instruction */ - tcg_gen_exit_tb(NULL, 0); } }