From patchwork Fri May 8 18:26:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186432 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp232842ill; Fri, 8 May 2020 11:36:37 -0700 (PDT) X-Google-Smtp-Source: APiQypL1hO0PO3AiYPthLdVzaHMAy2uDqhLbI3AgsjU/v/m+FAOj/iV0lOShb5eL98FwNOM+Y2pt X-Received: by 2002:a05:620a:13bc:: with SMTP id m28mr4017595qki.211.1588962997774; Fri, 08 May 2020 11:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588962997; cv=none; d=google.com; s=arc-20160816; b=dW6GtdiCoUD/UQeJBQ/KNu4nDMYFZla56e/prSS9e4vJ+zwVTxCypsKfqB9VwOpaVP zUmTIujX6iVJtdfqw4ipjK9yd0Ayj9lmP7Wgm+7uDwRr3Y6bpP2U9LYWKj4R7jvmM/mL n/AnT51tBGQvBKTUsVtX9f7hTAERyPR6MXfYxGCB4+HsxBRYBJ8Fx+lysv5Kp1p4vTo5 kmH++7zT0bfT09B6fEod8NN1Cpg2Cp7nnWgiCYvv3OecveKfVNDepFSjcYVqKkv038/n BnEluN2k++kzHmKKCqx7dMsE4NEiF9AGjGYyccox1c5TcdY0pztYzhIovF00k+PbDLi2 kU6w== 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=n208OOL/5mz9BQVOgVsrwweVrr5EapOZuk9HWHgyuak=; b=Yo++wDY4OsKu+cxgZT58Ff8W6jZbY3yVEeGF2BOwJaqu/9tNZERA1nSDE6Qz5e3IDf ljLIz3eTCjpvScoXRVAskmUWoQ3aeCrO+sP5goPTY0m7ILzFM2P2IJKuPfN+flmzqLL5 DibS4D91xlX9cDVaTc022TGfszuJS64Ex75iDpm8K7d0d5ITPZS1JFOZMFHx/TkccD8j uamnLiRxOTAxUi9YW+xKdGfqacdoPk25tYKk8CKIP95klTyOULkkE/DsTTYEqKcANTGq D5eOso8TUybeIrapCcEJXEwRDzEGRGZ3MKv2qVPuO96VsIs2+mJXAsGAQeKPcg/hnRcW PBxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vAqTNPkN; 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 bd20si1574336qvb.8.2020.05.08.11.36.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 May 2020 11:36:37 -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=vAqTNPkN; 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]:45442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX7rR-0005P4-AV for patch@linaro.org; Fri, 08 May 2020 14:36:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX7ho-0006yp-KZ for qemu-devel@nongnu.org; Fri, 08 May 2020 14:26:40 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:45833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX7hl-000788-O0 for qemu-devel@nongnu.org; Fri, 08 May 2020 14:26:40 -0400 Received: by mail-pg1-x543.google.com with SMTP id s18so1223426pgl.12 for ; Fri, 08 May 2020 11:26:37 -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=n208OOL/5mz9BQVOgVsrwweVrr5EapOZuk9HWHgyuak=; b=vAqTNPkN8xkxkY+8+YQPsFhC3R0dMR5VB3bStjJkzwXj2bUolwMUh/h/GwA+fDgL9A wDlQDJCg5VvBkOAxDxDYOXUurCMYPwsdKsQGAnb2CiSyOkmCY4DUjch872w6FQXwrQFt evttjGW5RZw3UXzJU+ognuo6n5wnx7oaD6pfCQwSzLeKa6BrQl2uKQxR5MLf2NB8OEAH ejzF/P4WPyQkL6R2lYy8u3eIGfBxekuwH4lpzqcyF9Yc3XOGCWcOqjHJ9/e37j3+jStV lcoKtrm8H2qjZLI+Eu537L+dcf5ocTgxwwogkjImJ7w1iNj1gdK3txB1ev249fuUnsX+ HN5A== 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=n208OOL/5mz9BQVOgVsrwweVrr5EapOZuk9HWHgyuak=; b=FtL2JI+hpoO3UptI9dKouSnJcnRg0ihMvvHUTk3Qs1ZixlTh5Ug2YZB4/3TKgnkGB2 /c5sk8oQdvacnTWJDtMNGfZQyXiZo6Le/sXsmmbzyxjOmSIeWJeucgeRKidPer1FAjHu JXYNSyAt4BTM+prSmSN2u4mKoYnW/y+Yfk9ksANkx7kwEzRLwmBYiH7yZwcI1ozvnlBO JG0+kTxTXMSO3WoeKqgc9OKjTVVvuQbmcxF9lkmTCuceJrNGekxQGT6oJfBNxvevFNoh Nr/33/4VprsXbNumnQnFZcqFidJJuE+7TtYHb0lMRpIxu67cytpKeUhWZzWidG0yskP+ YlBg== X-Gm-Message-State: AGi0PubpRWIi93M8srpuIfoB5B7C00jEM13wuMM2B1b9FPqipuQi8sg2 /qxkB+O52yuHvodvXNo7Ybju3VP1S/g= X-Received: by 2002:a63:4c1d:: with SMTP id z29mr3094707pga.243.1588962395946; Fri, 08 May 2020 11:26:35 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id u9sm2421775pfn.197.2020.05.08.11.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 11:26:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 13/19] tcg/tci: Add special tci_movi_{i32,i64} opcodes Date: Fri, 8 May 2020 11:26:10 -0700 Message-Id: <20200508182616.18318-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200508182616.18318-1-richard.henderson@linaro.org> References: <20200508182616.18318-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::543; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x543.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: alex.bennee@linaro.org 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.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 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.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