From patchwork Wed Jul 21 06:41:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 483254 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5911450jao; Tue, 20 Jul 2021 23:57:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOkC1ylxopdA/mEvwxUPe0r3LUcxDJuxNzOb7o+IO8b34zT6LvM0Z2TgWP9RIKw91/hQhJ X-Received: by 2002:a05:6214:a0d:: with SMTP id dw13mr34522413qvb.41.1626850620300; Tue, 20 Jul 2021 23:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850620; cv=none; d=google.com; s=arc-20160816; b=Snh5XgnAvGHGKVjGsmEbvbZYOnwn2Nk2p5U/cDfn5qKf3CfzI0L/EF48tXPN6YPF6L lWMJeNEh/Zcl9MWVgLIvrnVA+vZCT3WqDPzicl5C2ZlOGP3OTnbAp4xT+SbXFcsmJ6Av P25isCSF1uWmmx4LIJBOalFUflhqnN1c2h/kUbEd31ulcW/QIrqKH3WUWkCHAMuW7wKl QmzcjwPAs7QAuxEJ0N2NKIXhjbD1QFBQnqYdKb/EOxyju3AozRAMB7U0JDNqQwKl1wFh NrEDVsuFBnMhsvYhIfW7/wndtrke326Qfa76yes1UkBDIy3XsmwgvOrLOGbDsjA9ieAa K9Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=nxysE0WWmRPDejzkpuSoJZ+4twcSCKioszycI2xwiIwUIbNS0nCIgwHTSvo36DpR4R 8kAh4OyAFXLo16dLw9x5A56+WMFpSH5F/5GACTyPyqwmAzLIG5HyIE1TQ/8R+rA/ZFra X8kE6VzoLTIuKCtRTNmjQM0qqSk/wahqxP3wVQh9+7n80Jzp4U3tTiUbtB2qlP88dhdx CMyZW07+Ru/WO4poxNV0QOcZQeCCs0eFs9R94yDSL3rBql2ZIXUgG23WELtsaaHeouVz Q6VnPYGEln8hmF4Vx7tShm0Gg6g1RJzJljqYpqyaRI++NUvvCGcfffzqCyfFxLgx6ke/ mh3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tdd5AaxE; 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 v12si9610946qkp.361.2021.07.20.23.57.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jul 2021 23:57:00 -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=tdd5AaxE; 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]:52382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m66A7-0003sj-NJ for patch@linaro.org; Wed, 21 Jul 2021 02:56:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m65vv-0005DF-PJ for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:23 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:36441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m65vt-0005dj-Hf for qemu-devel@nongnu.org; Wed, 21 Jul 2021 02:42:19 -0400 Received: by mail-pl1-x62a.google.com with SMTP id x16so486834plg.3 for ; Tue, 20 Jul 2021 23:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=tdd5AaxEGZ+CQZo5mjK5HAWpVuzuXgq2WwKfiM/XofK5sqLA529OnQQ/ZKp/4tgLvx hXkAwoqNhv3nG598go24w/CCu0JE/cr25z/Us9enfVPbo+FXAcVaeYkHi2a6JIRAN8yi g0FcgEEu4vB+CFlSr6zcxsUtjT7YfRI+OWzranrnfcAhRtthTm4UN9pI7oW87194i6eO ee0MYsTrKJyPI1Hl2y6Edzina20LFiNS4JOYQmMo4hYwDAJuk91HcQztwdN+hG0zmD/G 717i+l7ImwX1zEpFo8DdUkBzwY64cT8p3trtZGCZ44A7iIc4clZa9natfkLjImWzi9aQ aNJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D65+qbhBiQEHG5+8gyKCqsFmt2IVIgoiw1iwwfSXJMo=; b=MW4oITTxvspTZ54qDDMoHu7G3tDGnL7lWcooALoTy0mVDux4qoOE83++Vxv1xRHOib QSVBIEzLufnARR56sPZWX6fgxPI0Bti4t4oYgkE/wD7w/RC0xrLNXY86F9d1FO6YS3Ov ARJ0ULapAk5Vtlfd5t3VUBTP72OQUGy9fYHmU3S633NSd7nuDpZ73d3buNhOgGQfyaR3 EAEwjdHlqacuLzXz5SM/ZzUw60hoLnsF8XdrJLH8ZFamkI7aYsXSQ8jz03bFQTbaAD1N aMpUR0pPRHGhwbedCp5qo/eMAacpQ+j2bqeQqLIFtfuloh64msEOeA9SivuY3mCLAmB7 OS1g== X-Gm-Message-State: AOAM532GACq8IKyDKkzVbbn7fOqG/H3mqbERWj8wajiKOkyqtDzYVyY4 gPtV6Xo4eJOCF8meKBWQnv0LUiPM6HyDTg== X-Received: by 2002:a17:902:7c81:b029:12b:6ac2:3ad9 with SMTP id y1-20020a1709027c81b029012b6ac23ad9mr20187364pll.76.1626849735170; Tue, 20 Jul 2021 23:42:15 -0700 (PDT) Received: from localhost.localdomain (204-210-126-223.res.spectrum.com. [204.210.126.223]) by smtp.gmail.com with ESMTPSA id q17sm21146132pjd.42.2021.07.20.23.42.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 23:42:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 17/23] target/riscv: Remove dead code after exception Date: Tue, 20 Jul 2021 20:41:49 -1000 Message-Id: <20210721064155.645508-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210721064155.645508-1-richard.henderson@linaro.org> References: <20210721064155.645508-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have already set DISAS_NORETURN in generate_exception, which makes the exit_tb unreachable. Signed-off-by: Richard Henderson --- target/riscv/insn_trans/trans_privileged.c.inc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.25.1 diff --git a/target/riscv/insn_trans/trans_privileged.c.inc b/target/riscv/insn_trans/trans_privileged.c.inc index 32312be202..a7afcb15ce 100644 --- a/target/riscv/insn_trans/trans_privileged.c.inc +++ b/target/riscv/insn_trans/trans_privileged.c.inc @@ -22,8 +22,6 @@ static bool trans_ecall(DisasContext *ctx, arg_ecall *a) { /* always generates U-level ECALL, fixed in do_interrupt handler */ generate_exception(ctx, RISCV_EXCP_U_ECALL); - exit_tb(ctx); /* no chaining */ - ctx->base.is_jmp = DISAS_NORETURN; return true; } @@ -60,13 +58,11 @@ static bool trans_ebreak(DisasContext *ctx, arg_ebreak *a) post = opcode_at(&ctx->base, post_addr); } - if (pre == 0x01f01013 && ebreak == 0x00100073 && post == 0x40705013) { + if (pre == 0x01f01013 && ebreak == 0x00100073 && post == 0x40705013) { generate_exception(ctx, RISCV_EXCP_SEMIHOST); } else { generate_exception(ctx, RISCV_EXCP_BREAKPOINT); } - exit_tb(ctx); /* no chaining */ - ctx->base.is_jmp = DISAS_NORETURN; return true; }