From patchwork Sat Apr 18 16:19:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 185559 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1902423ilf; Sat, 18 Apr 2020 09:22:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJak4dzduRnldBuPIUnWiPHLT0yK0rMSbSziSD22QtiV50HPIr6DSzQyHxqV3ai/RLhAd4U X-Received: by 2002:a05:620a:c89:: with SMTP id q9mr8194924qki.375.1587226936953; Sat, 18 Apr 2020 09:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587226936; cv=none; d=google.com; s=arc-20160816; b=iXFXKjJs5MI2SNsCE8HYTm5OWudX5pMyKs4h7PVrUhhJ12YKZLkLtJ8Xe8kINCRn5w arxULVXdTgDjSRKDnHWtEeZ7BTA1aZlgv3ejoRHWojLh+SusRkxzsVJlZ+g/fWKcs1yg Y3fXT8nTqVas+dQRNpj6zkaoU2VvtSlMyZ/ihmH5bTKVehK4rRthCWDusHuhcEE+Pl1u TRpvD07VwofucOmFPi5yh3iHMadmsTyHgUsOfyYOaNCsxLNwOOT4LtxNP+6NVRN/EkvR Bp0LcwVEhjjFe2JOhXZRUUyfo9+JcCnHbQOJNJ1O6KZIxLGNMAUnS6CMyxBsP1RfbBFk yt/Q== 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=Zdjt8WpN4waxB25J3ykCncF8gpDtxEJVdnhsqarrM50=; b=t1oSvLb2ZKZQzX9JFgS/aSqDgU1KP/9D/sjPyM09VCJfLwhwdYB2wjIZDKPSUN7FYh ZqZbzF8kpFBin9Po3prgvO9GaTVmjgn7Kw2V4N8v9WLuzqPlUgSeW2dbMhl7JtSViDbH CxxW/ctqxU1M5JbhBM5LYGLW1VVWo5tmP97JiZvHXkjnww38/uiRqO4IjLskHwh0Ioj7 eTaiz6+7DmycvyNoe34d3ifSvpY79V4FZCeJsGQODWPZhX5J9rOqGXKepU7qlZGU7WB4 E0T+PKrwP/XEJ/GacWvOh09w6gjMgYFQKXZ9+/4LLKgIl1c9tXyf2E2qQ228DP9bCJD4 sy7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QwtnPhgr; 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 g59si10811001qtd.113.2020.04.18.09.22.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Apr 2020 09:22:16 -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=QwtnPhgr; 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]:59630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPqES-00084T-3T for patch@linaro.org; Sat, 18 Apr 2020 12:22:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPqBo-0004Iz-IH for qemu-devel@nongnu.org; Sat, 18 Apr 2020 12:19:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPqBn-0005Lc-Bo for qemu-devel@nongnu.org; Sat, 18 Apr 2020 12:19:32 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:41536) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPqBn-0005Ii-5y for qemu-devel@nongnu.org; Sat, 18 Apr 2020 12:19:31 -0400 Received: by mail-pg1-x544.google.com with SMTP id h69so2754936pgc.8 for ; Sat, 18 Apr 2020 09:19:31 -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=Zdjt8WpN4waxB25J3ykCncF8gpDtxEJVdnhsqarrM50=; b=QwtnPhgrhOXmMsn5hHVTSYL6WN5GsmWrg4zkIQUdfrJde0kF067gpRLj+SPPQK/nHi GG6t/U3QvIZSm6oeClE2vY6y2fedj5uftEENO1YEZ3Bj9wmFdEqNywAPYnGBM3UEgaES d5dpiQZ+F6u7ALkGJVUbj855Zu/SY8GQJti970BSif7jBq/2nGcZuDKjxvT8es67F4Oz HGrwl2Q89BwwirzurxT9l+VrO/IzAGNF7gpc72K15FbJ2F73EfsBOr/Ra14/HQwbGZRc lssz1cppqTTpk1xp42HjDPT54cOJ79UtctyWzh3QD2NKlu9q7DPMlUWQlXKiv7g9TLYN 6tpg== 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=Zdjt8WpN4waxB25J3ykCncF8gpDtxEJVdnhsqarrM50=; b=QHe+bvN72krQrTQs/vZM3+ACHoByX3SLk9/Wsl7Gl5Fj3oY7EbSVvcHNYANIEugUrc sh/qz/D7ZDoQntbCb2/h/+3La0ON6WEpKlXN8MQjx7GlMPeyIRhSaVRJ6wb0IzOOrpUF QHcVe2GfhmGh9f+TQNb6IAuHAq++LQDDvBSaBR0ORWu1DeMW4AKX8Tv3xO9zJPGvpN9D 28OaHUDkwJhuNp/4fsoniiglx8oeCljWNDPMDjUdnjpTiuPMH5NgWK61un0+Mm75CDtu 9i4XK3vmQfG0uNeX81ond+W4mAEytlc4Rt6++Q8gFChqkAjsU/EKKeoEczNO7NisSTKs YsWg== X-Gm-Message-State: AGi0PubarhSHkkELsO+hRSewIYg4VPLMjiU3rR2WbwbIZ85QCK0UQ7x0 wRvAnl7lchFM6G6doeKkhgTF5unAQxk= X-Received: by 2002:aa7:93c2:: with SMTP id y2mr8580079pff.50.1587226769846; Sat, 18 Apr 2020 09:19:29 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id i187sm22398382pfc.112.2020.04.18.09.19.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Apr 2020 09:19:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/16] tcg/tci: Add special tci_movi_{i32,i64} opcodes Date: Sat, 18 Apr 2020 09:19:08 -0700 Message-Id: <20200418161914.4387-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200418161914.4387-1-richard.henderson@linaro.org> References: <20200418161914.4387-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 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" The normal movi opcodes are going away. We need something for TCI to use internally. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h | 8 ++++++++ tcg/tci.c | 4 ++-- tcg/tci/tcg-target.inc.c | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/include/tcg/tcg-opc.h b/include/tcg/tcg-opc.h index 9288a04946..7dee9b38f7 100644 --- a/include/tcg/tcg-opc.h +++ b/include/tcg/tcg-opc.h @@ -268,6 +268,14 @@ DEF(last_generic, 0, 0, 0, TCG_OPF_NOT_PRESENT) #include "tcg-target.opc.h" #endif +#ifdef TCG_TARGET_INTERPRETER +/* These opcodes are only for use between the tci generator and interpreter. */ +DEF(tci_movi_i32, 1, 0, 1, TCG_OPF_NOT_PRESENT) +#if TCG_TARGET_REG_BITS == 64 +DEF(tci_movi_i64, 1, 0, 1, TCG_OPF_64BIT | TCG_OPF_NOT_PRESENT) +#endif +#endif + #undef TLADDR_ARGS #undef DATA64_ARGS #undef IMPL diff --git a/tcg/tci.c b/tcg/tci.c index 46fe9ce63f..a6c1aaf5af 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -576,7 +576,7 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) t1 = tci_read_r32(regs, &tb_ptr); tci_write_reg32(regs, t0, t1); break; - case INDEX_op_movi_i32: + case INDEX_op_tci_movi_i32: t0 = *tb_ptr++; t1 = tci_read_i32(&tb_ptr); tci_write_reg32(regs, t0, t1); @@ -847,7 +847,7 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) t1 = tci_read_r64(regs, &tb_ptr); tci_write_reg64(regs, t0, t1); break; - case INDEX_op_movi_i64: + case INDEX_op_tci_movi_i64: t0 = *tb_ptr++; t1 = tci_read_i64(&tb_ptr); tci_write_reg64(regs, t0, t1); diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c index 992d50cb1e..1f1639df0d 100644 --- a/tcg/tci/tcg-target.inc.c +++ b/tcg/tci/tcg-target.inc.c @@ -530,13 +530,13 @@ static void tcg_out_movi(TCGContext *s, TCGType type, uint8_t *old_code_ptr = s->code_ptr; uint32_t arg32 = arg; if (type == TCG_TYPE_I32 || arg == arg32) { - tcg_out_op_t(s, INDEX_op_movi_i32); + tcg_out_op_t(s, INDEX_op_tci_movi_i32); tcg_out_r(s, t0); tcg_out32(s, arg32); } else { tcg_debug_assert(type == TCG_TYPE_I64); #if TCG_TARGET_REG_BITS == 64 - tcg_out_op_t(s, INDEX_op_movi_i64); + tcg_out_op_t(s, INDEX_op_tci_movi_i64); tcg_out_r(s, t0); tcg_out64(s, arg); #else