Message ID | 20210630183226.3290849-21-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp629741jao; Wed, 30 Jun 2021 12:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVCfGZJqoSZL70U6Djlm0kQTw7Lfcftvx0RnwqHO90F4qjr95KBZ4jeNZf0EIz/MqhTiZb X-Received: by 2002:a25:e685:: with SMTP id d127mr18205511ybh.513.1625079850590; Wed, 30 Jun 2021 12:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079850; cv=none; d=google.com; s=arc-20160816; b=ngvu1s8nOaaRjFHUaQlfAUDRQQjU6u8At1+3Ik2n6UbEeqtexh5uWO3Y0nwZ8ZRhGA brSdhdxZ4IWLpjtKYrDjiz8ncBZj6fZRNcjqd2Mpzs3o2aSvVYCAvCbTCIHMRoI9e+Co P2zx/KhLj34NouwZ70+lxZ9pVOzJM2D/NfHGsaYPT4Gs1ojjr55RFl7EI8F6cnaxYv2o 10d0zpTKyYjgImmnezbOmHza6WT4ZPK070lsv+gI5kWp7AsA4bbT0hUMzK2LRU+lqP34 A19zP5kQVqxYrYNanFb97FfZssB3NOziN3iV1iJvwWhzepRTbsO+rRAchLNwIOcNiSre opSg== 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=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=FHKzOvXIRfuRKNOss5EiFNu2m7vwXl33AtwIULeDk+CO/qZVLEEDqGRqg9qYthz62Q AYH4N9E1SOSgGcb8gyWyff5+HxIkxZC8lx3RCEE7vQwRjceB0d2k48T3FI61I8Ep+aQf ieNK3TSA2QixZ3RBGM9JaDiKbswhFH9l4UrceJyr/CFWGf1jq+s4JcoPd4KO9IqHSEhB OEXKgc1MscK4vASZ9yR5DYtDcQp+sifgncr+M/l6iP3f9rPuOpWKEOI0zHpm028muHb6 acRzwuVcu2bZVIEYdAxItKs+CLYhxsC6Brqdq6pEIdQgXl96VUe2T2YrypAemu97gc8K Q3WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GdyoU+pD; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x3si5273306ybk.435.2021.06.30.12.04.10 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 12:04:10 -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=GdyoU+pD; 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]:57864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1lyfVK-0007ZC-18 for patch@linaro.org; Wed, 30 Jun 2021 15:04:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lyf0t-0005Xg-JU for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:36505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lyf0q-000269-Nl for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: by mail-pg1-x52b.google.com with SMTP id e33so3206977pgm.3 for <qemu-devel@nongnu.org>; Wed, 30 Jun 2021 11:32:40 -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=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=GdyoU+pDjgC5vaOIFMPFPUzeA4XDK1U2IbSm0CjZKckHXgoDFxl87b2v5PfcFyMzGv p4GEg5P117AM8ysRPeVnZKuLTOoynPSxIjylJYdkdobwd40J8ApFLpdCvyCSL5fQcUV4 8siXASKGrDvwMb3tU6YJvPsdkK7UC3hwLFKklvaDYyYUun7PVrYV4by1oQEfED5V74hy 1lgmOfm3qMJQG4q2qHtcAEDztAFx+BwX/kFDV00zIeS/SE34N0OisOl44IAwVwVTckP8 PcKYdpxBLwGRBMi/LBN0K6ePDsjcSQHVoa7rJ2VVcSTtTsZyhvvyar8U1oWjNCLIFegp qBEQ== 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=Q7Ia+ie6XOcjpcC/dD6Ub5PbrcGQ/yV9nqv+RZL1T9E=; b=S6eySFVe33ItExAzEgMGOrf/IyhN7d5VWtQigYbkVTPz9N/V1hRiT9rHMQ6gz6jzWn IMrZCb17XyCwYIUKCjnSAqPjRqQf5reHlrnG0zxFKsWInI6fzs9xpuPvzGGSRxX/uwi1 SYYd4Zq0pUzA6k4/hS5urEZJ4oqjQAgpPwrfhZX8icvKlWsZ70LrgTUdVOCnFfR+rDTS wcu3Kl5VhRvtm2JEMTDki0zwWaRNWJ8QU/n7ot8maCIQtnbzcgdQapkhIiYfrluPKGNY vIlkR1xicpLExIraTakpxnLZU4TlYMtks321xFc8tRz/d9oqMXz6awGBw606pCyT2Yt/ Uikw== X-Gm-Message-State: AOAM533xN0rTVIWtr0vshNbucpIoacnpWnBPOjW69p6S1Da5OVit/5zq hWpa4iECHg1cvSsh2XQThOA5bS0dcEwZrQ== X-Received: by 2002:aa7:8d5a:0:b029:302:e2cb:6d79 with SMTP id s26-20020aa78d5a0000b0290302e2cb6d79mr36886657pfe.71.1625077959472; Wed, 30 Jun 2021 11:32:39 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:39 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v2 20/28] target/riscv: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:18 -0700 Message-Id: <20210630183226.3290849-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Alistair Francis <alistair.francis@wdc.com> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
accel/tcg: Introduce translator_use_goto_tb
|
expand
|
diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 62a7d7e4c7..deda0c8a44 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -168,29 +168,11 @@ static void gen_exception_inst_addr_mis(DisasContext *ctx) generate_exception_mtval(ctx, RISCV_EXCP_INST_ADDR_MIS); } -static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) -{ - if (unlikely(ctx->base.singlestep_enabled)) { - return false; - } - -#ifndef CONFIG_USER_ONLY - return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif -} - static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { - if (use_goto_tb(ctx, dest)) { - /* chaining is only allowed when the jump is to the same page */ + if (translator_use_goto_tb(&ctx->base, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_tl(cpu_pc, dest); - - /* No need to check for single stepping here as use_goto_tb() will - * return false in case of single stepping. - */ tcg_gen_exit_tb(ctx->base.tb, n); } else { tcg_gen_movi_tl(cpu_pc, dest);