From patchwork Wed Sep 9 00:16:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 249413 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp5017460ilg; Tue, 8 Sep 2020 17:26:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlAOd6N3QDdCzokOIu7CiF/aEO3KsT+hc+1KLwaYZN97wHSGpYpNYDc7p1l57aSQEvJRtp X-Received: by 2002:a25:660a:: with SMTP id a10mr2078257ybc.327.1599611212120; Tue, 08 Sep 2020 17:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599611212; cv=none; d=google.com; s=arc-20160816; b=OnIVBypD4dx9JMsxx3y7NQPA2/Co3wsbsvAHqK2+BI5GywU9smw+fcdhfIRQP/3iPC g3mkVGy05x81m8kbUTgOV2CC1FWtL+cweG2NeY1zJg2lEMQZCiyVkrVVmunR3M1nPdN4 tFAfDc8UVBKicifkaqw1zelqakoQO3MFR69jDbL2DPQzyI7TSSaeNIxVEN6L1KIOhcOy dcCPPcHEnu/UVBRUPgjmRdSJl/Vj8MpJ5xPDKoYMAUagWVqT3YTepgE3SAS3AYMs8kLq hbUCxoxTwP2KGDm+/tj5rxdnf8RgFyga9wTZyZE4QToqVSucGR7EtwSqM6OyBfE01HWP LQUQ== 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=tgLoS46T1HySALWu2osFoRUIKmh8CryJe2qEASNX6h0=; b=tdvSd8/gS8JkKehpJOn5OHuP0GHdC+x2rq6XH2SiusyEO5QaXOt3zkYCuAtgkvM/81 DXlMURctppQ6ReTfTp1r52+kRU/TwriXKFtVIMFMRaFrzrtL1wSitskzjIB03tR9kk15 M2g7edShaSnrE8RP2BDJdPG1eAOkYt4uhkih9Q11qxDIRd7OlObt9jWZ73NpTZUz35U+ z/kC4e7aiNs91mWTZb+YS7epcKizEHUnO8WdA7QtOcKJOihmEZZUO98qf8NawvX6KR9O FC14phrLvpuzxCLQgzd0KLHKar0wegcwH3zrWVpRw1ihvATiEKY34+pwZIXZI7h7mEA2 7X7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ae6bfskK; 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 y5si965308ybk.174.2020.09.08.17.26.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Sep 2020 17:26:52 -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=Ae6bfskK; 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]:52428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFnwp-0005Cp-J1 for patch@linaro.org; Tue, 08 Sep 2020 20:26:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFnnj-0000GI-92 for qemu-devel@nongnu.org; Tue, 08 Sep 2020 20:17:27 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:41718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFnnh-0002Ho-9T for qemu-devel@nongnu.org; Tue, 08 Sep 2020 20:17:26 -0400 Received: by mail-pf1-x442.google.com with SMTP id z19so549531pfn.8 for ; Tue, 08 Sep 2020 17:17:24 -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=tgLoS46T1HySALWu2osFoRUIKmh8CryJe2qEASNX6h0=; b=Ae6bfskK8CTck2/VLO4ujMWf/b6tNFlk2D0//KMpInnVPX33FPH/HrAG53VFxOFVhI 2xCFsBGbDGhhVwyFtbCi1XzuNryfQ349/nbrrUpT0oZEitDgzXDWI+49I1iPIzOMnCFq bD2lrqrOmbnwD1ikxPVAm9syaETdxe5RySsdh2NVYmj/EorHKyvnrn36MlRdOcZnPVuG +VijV250hDZt2XbxXnRuJKA4/NfD7tDmf7QKfvDqo+ORR4LjOF5yzfzeWlIyCBD6+hlr KRp+Dg2jVexq7r2dTnMafoCD0cUDtOXXpn/a9lqEglKTYqeWGIEbV6FSYFeYup8KJJq5 c0NQ== 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=tgLoS46T1HySALWu2osFoRUIKmh8CryJe2qEASNX6h0=; b=f0lMG2hFsjNEh77xfpeabENY9aNHo6XiNH1/abqIH7EMp+mQyH9G8x1WuePALTxa3P Zh3mF0Md/GSie4jFEHYRNLB6amY6tVyI0A4LbY0/0hp/UkXhA4SMiPLbsxdGlEkwoYM+ wKvkd2F7lyyYWPmARDMvwylkGMifL9ug5SfBwSMdJrNftmwL7tF6t1N7U8zMlQDapwxA gtMKm+pr+VtKOa5FjENu0jCNd9Lsqhu6W4PaLDygROkzexYZH0VgJeaG8A3WMAe0syLA pJUPem5/BF+NGIDql1BI8nqKc8YRU1KOGd3XuPmaqRgoowGhGM3ZWgK8ORkUvNZy9R6l TGRw== X-Gm-Message-State: AOAM532StWu5T1mhjl/KmHP9faZZO5Kwl43+uVF4+jkZNs+Wf/2cNH5u khYniAjyJxh6QDGA4SxvaW1+gYBoMsm70g== X-Received: by 2002:a63:4902:: with SMTP id w2mr953967pga.311.1599610643634; Tue, 08 Sep 2020 17:17:23 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id 137sm505437pfu.149.2020.09.08.17.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 17:17:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 27/43] tcg/tci: Add special tci_movi_{i32,i64} opcodes Date: Tue, 8 Sep 2020 17:16:31 -0700 Message-Id: <20200909001647.532249-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200909001647.532249-1-richard.henderson@linaro.org> References: <20200909001647.532249-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: =?utf-8?q?Alex_Benn=C3=A9e?= 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. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h | 8 ++++++++ tcg/tci.c | 4 ++-- tcg/tci/tcg-target.c.inc | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) -- 2.25.1 diff --git a/include/tcg/tcg-opc.h b/include/tcg/tcg-opc.h index e3929b80d2..5a941eaa07 100644 --- a/include/tcg/tcg-opc.h +++ b/include/tcg/tcg-opc.h @@ -272,6 +272,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.c.inc b/tcg/tci/tcg-target.c.inc index 231b9b1775..c8c8386a72 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -529,13 +529,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