From patchwork Tue Jun 29 18:53:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468330 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5251224jao; Tue, 29 Jun 2021 12:26:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4dM9pkjo8jnWVPMWUyexiLmfqIUelP+8IX0vVvHtlocnnHbv1gvChXi8rsznnMdNdCX93 X-Received: by 2002:a25:6088:: with SMTP id u130mr41912118ybb.257.1624994791248; Tue, 29 Jun 2021 12:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624994791; cv=none; d=google.com; s=arc-20160816; b=b9dEcfA2V29MUZ9eam1UMKPkfoOJyO5ZqSLQcuNivKzMDCCaTz5QDQpEvfu9hPGeRB EXVcy9OI4/OjkEKNMNkyHTxHxCvnwHTla1oOGcg0bdJoTk9M6NBZXSJlJNR392BPY2FR f3rfoEOTo9N1EPifga2yRPnQSH5wgcBsgI9IhlctUkxwDCZ03sDpmihy6jb90rHwecow zaApAETdMMw+bqpQeTM7OdjXm3f9bwzZcV7CcgQPMY9XVPlN5yy1Swaf3Z0N19KgPGvf Fx4/SvCpdGHAIHM9/iobv48KHSHHtWELtDxuKHTVz9dEoUl02Xzek1HfrltpQhwEmLs2 M8XQ== 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 :dkim-signature; bh=Mh5EZkP0+byxDxbYNRT/+ZJFV0r5FEDwMRHJL2U5umA=; b=fD2lNUEgui2Hi+DnImLAVMD8dBltqjGpCLwlWKVMo2/8yED8mRDPHw9UsXKWdb2IaL bFeLn1VuFlfUxwWXpeqFjxNCM/JUwA119PGhgXwrrLL5wPt+0vKaIdI0MP4FnLlZv22s Mdz7JZBVgnv5GVlBZy1/ydqw+BLjGA5uIQMTa7wuOB7ELSCr8wW3Fu7YPYy94T74QqFM lgBmzqYWq+II2nkZfiu+56u+udWYIPoFRZu9guBOK2lY5kVQPKw5IEWKeoysy8aD5YPP zNu2VrE8g0NRvjiNaedmWEtwnjjSIV7fn0vM6SlFyj2D6E1oXZUEbzMnYBHXUFhljk6j cc3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PCAnACyl; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s95si5499144ybi.476.2021.06.29.12.26.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Jun 2021 12:26:31 -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; dkim=pass header.i=@linaro.org header.s=google header.b=PCAnACyl; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyJNO-0000KP-Ng for patch@linaro.org; Tue, 29 Jun 2021 15:26:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyItA-0007zX-E9 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 14:55:16 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:42511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyIsv-0000ru-ED for qemu-devel@nongnu.org; Tue, 29 Jun 2021 14:55:16 -0400 Received: by mail-pl1-x631.google.com with SMTP id v13so28569ple.9 for ; Tue, 29 Jun 2021 11:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mh5EZkP0+byxDxbYNRT/+ZJFV0r5FEDwMRHJL2U5umA=; b=PCAnACylR+xDqvAL1HKR5NfjoFNG8Jc/sQRgW7JUGpXZoXN3G8yY8SHq6UMGCJ97PO 0+PD6p3Y8gEd9y3Mt6P67QJKr/Dm5szerJ3404uEHEyedel8trpXUJqU5QqgusCEmpx9 fGw/oKyQ/6Pcnit0xndTMv5Y34z2e7G5Bmztf3cEOdijP3mOarsufrRF+eAgEv/03kQG Q9tJmBpdAQsRiQN8MGnL6flllVINjoRDom284G/MwyLgORPiHTOMLidF9mWCsnhlHDEm RLTy8SPAWpCj84xD5axn/yAB/ouE5vlJA26UjYQuXQ9r9oubuTwo0+VV0R7YfD2jnda1 HjFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mh5EZkP0+byxDxbYNRT/+ZJFV0r5FEDwMRHJL2U5umA=; b=cmSqHn4RiPjYXLqhzeui9wFZ6l3GXRGjakRgXgOoMEz6KYsptAJkc4rCpcHDH8VtCU bo+EVYXIuME4M/Ih/On/vXOnXwmCR0qvPDadufao7RTBhbpLxyoWGf88+PhRN/d8GHr3 zBIs5VvNN22sptpWGjRVLyMvUKhNN80F+piI0D3DC7cUB+DzCfq192NOXSkL03M9LEPq 2pandQ7wrks2gc3KwXapFdWEzQfE1LCNYg1jF7v/JF1fTVNbXImDtng0BQ5EozImrCIP nRMx7M6/nXc2+8CicV6l/HzksLvf/OakGzvsb+2afuLsQgzUMY055uz5hYg/C7uVaJ4B 2WrQ== X-Gm-Message-State: AOAM533+/jR1TEIb1PklhvWSXs8IlBzR3XcIe9RlKw1p4sF4DomB4kDw A5a0z3gAe2cNbiEhX5aqjaUwCXL3tzGA3g== X-Received: by 2002:a17:90a:4216:: with SMTP id o22mr297028pjg.3.1624992900212; Tue, 29 Jun 2021 11:55:00 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j2sm18811253pfb.53.2021.06.29.11.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 11:54:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 07/63] target/nios2: Clean up goto in handle_instruction Date: Tue, 29 Jun 2021 11:53:59 -0700 Message-Id: <20210629185455.3131172-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210629185455.3131172-1-richard.henderson@linaro.org> References: <20210629185455.3131172-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/nios2/translate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.25.1 diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 6fd4330b31..9e71267b42 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -753,7 +753,8 @@ static void handle_instruction(DisasContext *dc, CPUNios2State *env) op = get_opcode(code); if (unlikely(op >= ARRAY_SIZE(i_type_instructions))) { - goto illegal_op; + t_gen_helper_raise_exception(dc, EXCP_ILLEGAL); + return; } dc->zero = NULL; @@ -764,11 +765,6 @@ static void handle_instruction(DisasContext *dc, CPUNios2State *env) if (dc->zero) { tcg_temp_free(dc->zero); } - - return; - -illegal_op: - t_gen_helper_raise_exception(dc, EXCP_ILLEGAL); } static const char * const regnames[] = {