From patchwork Mon Sep 23 22:59:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174229 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3401582ill; Mon, 23 Sep 2019 16:05:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxR9atvukkIDkB7FI2l9yMiniCt00eehYmzFVaf4xrfYLT/6CtyPml4uBF8s8OeCZ9HETAw X-Received: by 2002:aa7:cd5a:: with SMTP id v26mr2625917edw.256.1569279928894; Mon, 23 Sep 2019 16:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569279928; cv=none; d=google.com; s=arc-20160816; b=QY4jS/K1fgm8kzRhtEhADOce5BZcanTocNFqEH5XG9lElpwdEub+J/ex1pSBh1mwOi pUUXNj5bwpL8wz18IKnPaYUbsyCAUu/B4IySMt4QxWLLL3E1RLVY/YoRg50IzRxr3Fn7 awO819ykqmND3nc4YB6wjEmEamkPj14klyivo93oolqFBVtAlcZegC2Sw/VlvA3fSKJs 2/2gV1Wc68P/gth/GsoDnCStX7qKmQWLiTil43jPi1A+NrBUUCwA0duJK/Q72IA015iN NetqutPTV9FChn7T0tDAvqA6O6JFp2LSXEM1ov1VB/P0GLETr5qpd5/lPchn0/d8fuWN +TiA== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=QCKS3yxfLQ4jE5yT+JsFmTOrmseheZBe+jPLNTKKzwI=; b=M3GRw4AK7UfwUwv8u2T5rdAuNEaz5Rn9zB8cLcw2+S0NMbQ6WgZrTyheRtDKU6gIZH Cbe7feKE28LfLrwcpzGZWm8TSzZi7SV6e4yh9YKrBSbGkPoIZT7KAqH0Ruzpri+lvECj Qt9IImHXWLa6W8hUeIhGuBJIUd/JWTH38KtJaejFV/ur1hZzN/C6GINUWcmQFmW5/wfl Jt8EuQTdWgsdQ+ghSLG6NC+63cJ4ArAcJL3DsCqqJqJ1x+TwvwIMgEZBqFPHzhF2JFIf +nKvw7/WHHXgLtFBNfgEN2kfX87iqTxDqEZbyMY099iMdC/vp2AyctNrJY7aRbp9J+WR q6Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tQZ9bhlZ; 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=fail (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 nj7si5783232ejb.262.2019.09.23.16.05.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Sep 2019 16:05:28 -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=fail header.i=@linaro.org header.s=google header.b=tQZ9bhlZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCXOZ-0000VM-EJ for patch@linaro.org; Mon, 23 Sep 2019 19:05:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35769) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCXJb-0005Y1-2S for qemu-devel@nongnu.org; Mon, 23 Sep 2019 19:00:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCXJY-00082F-3a for qemu-devel@nongnu.org; Mon, 23 Sep 2019 19:00:18 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:39790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCXJX-00081W-Qm for qemu-devel@nongnu.org; Mon, 23 Sep 2019 19:00:15 -0400 Received: by mail-pl1-x644.google.com with SMTP id s17so5724938plp.6 for ; Mon, 23 Sep 2019 16:00:15 -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; bh=QCKS3yxfLQ4jE5yT+JsFmTOrmseheZBe+jPLNTKKzwI=; b=tQZ9bhlZ78sLR0JmELQxY75Ky/qNTx8OOgpz52R5Uw8qOCjxeKwQWqX2aKHXYGKMsd 2oWixByLYfif6P7v505svSGt1w2akl0C+1u8K/iWFQ9yN9Odb2MsI8ZIEfgd1LUwV18b hKwGPwukX+/AZtWCThzPvy8RNy19/h9KStpRoTFqJa/EYsdvfa0II9TFjeqDRirgBmrD ALuRtmrMV6/sdCIbZKK2vjIebEUpJeDE7StIABJjmyN7aWjhhV9AV9oN3t5AHY73Muaf iTBjiNPh6FFxmbSiRVTk7LHo3dvztMOdKPW4AjWI5/l8lBP/RGVI8TBeK2wh7S3lZY7P QHOA== 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; bh=QCKS3yxfLQ4jE5yT+JsFmTOrmseheZBe+jPLNTKKzwI=; b=tRkSY02VQCJlLIaNOxDfwIAf7B8+I2IlDdHyGN/n3dyDghZtAaV2QfU7aNMEkcRadQ afPUHlFMRdmKIBPaHeoHblqrN9x/UZTpCkIwe9Eip+64DntIDD+0gYSTGb2IQsUJamb+ zwuJwUroUFRWm2vuTizRq6glplb1iU7QUzT81piZXS1U48HOTzMCcJfq2N1si42ctzwS Gz80RdZEB98gHtoTB7iccOOdXBarR+hfRIyHHxzhlc8qgwuF0HVVACfXpclYHvMtZ57r qFM74Rd2oNq7VWjyPBFbGoC8HLbQ9L+SUQj6AsEWAXo40AhqIpFyA/4tovhBhIv7TmRU gu/w== X-Gm-Message-State: APjAAAXzM0FuwK+EbrSs34ctXi+eAX5Bhta9P/Gb+waZLhu5oTsKZ9LS aR/3Ue2c5+uSWaOx6CQPA5AYfNaTzro= X-Received: by 2002:a17:902:fe12:: with SMTP id g18mr2107665plj.97.1569279614328; Mon, 23 Sep 2019 16:00:14 -0700 (PDT) Received: from localhost.localdomain ([12.206.46.59]) by smtp.gmail.com with ESMTPSA id 74sm11674810pfy.78.2019.09.23.16.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 16:00:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 04/16] cputlb: Use optimize_away in load/store_helpers Date: Mon, 23 Sep 2019 15:59:52 -0700 Message-Id: <20190923230004.9231-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190923230004.9231-1-richard.henderson@linaro.org> References: <20190923230004.9231-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::644 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: pbonzini@redhat.com, alex.bennee@linaro.org, stefanha@redhat.com, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Increase the current runtime assert to a compile-time assert. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.17.1 Reviewed-by: David Hildenbrand Reviewed-by: Alex Bennée diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 2222b87764..e529af6d09 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1396,7 +1396,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi, res = ldq_le_p(haddr); break; default: - g_assert_not_reached(); + optimize_away(); } return res; @@ -1680,8 +1680,7 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val, stq_le_p(haddr, val); break; default: - g_assert_not_reached(); - break; + optimize_away(); } }