From patchwork Thu Jan 14 02:16:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 362812 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp76307jap; Wed, 13 Jan 2021 18:37:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJz97hGCWz+i3pdACho5KDoq0rckx0HowiUavxox0ylEEYdTdz/nLA7nMTC7NFbXvxbkfQdV X-Received: by 2002:a25:584:: with SMTP id 126mr7515536ybf.112.1610591841888; Wed, 13 Jan 2021 18:37:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610591841; cv=none; d=google.com; s=arc-20160816; b=e1/mgDLW/YnvBgEgEXNzh9rx/cN2SJWmP7WpFRQpNDUcMP1LapOsFhIK2TCF9G1y4U 7n1YCgpG+tBKmO7BEBJrPC0W5bq8CjYDbsdJifCPQT7QwxtofLRQ5pU3Ff41S5L54S1n YyyGB5+dkhSocpQmY1IUiMVGg99HgBRW9JtAAqHD6IaaC37hFUoyn/HXUoPr2HmOikPf Ya8klmm1L8CIz6eD94OUtqtmU8XyN1YpfyCG7ygG3+SLYTy2MHmwtdEPPMhnvKBhfISw 3H/8U1tlpT3P3AP5WTeJZ52nraBiDSepE8tj16v8aq02EiqZLDvRH5KS8Sw6fr6JM6Wu j71Q== 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=Hx+ccawlJdzu7GbQDl+NdiAx6KUHgVaeD5cM1vlFohs=; b=koGYjMAd19nriXiRD2PpyYlcuKLmbN5NmHnhuZdddAS2tEHJ//fGDV+RospBHceP5K zYacqHVpdqkGVERJ9Mu5cmj1HBNk0mUu/ECzHfjEzR8X4n1fLKvMVoykrkff8jMLLvZ3 LIRtv7GxphZ2din5n/XU5kU+Mm2TBBWT1cTCnUn1ONlR7+rlTsCrDbEtnbBCzW3/g1sT CTwKng1XfAWgaiujyny+23oUFFLbpKRNzOf9Ventxgt3phVEYWHzYZF5CZExMDJYgLRM uFQlU3GOf9MlIMQU6D+HpNycGuzL6IKhkfN8/2eGeVJ/vEGaMzIy5QHevaWUkPh/UTzi 7ioQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ioEcRVLD; 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 n132si3762702yba.482.2021.01.13.18.37.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jan 2021 18:37:21 -0800 (PST) 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=ioEcRVLD; 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]:34082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzsVl-0001yD-Ew for patch@linaro.org; Wed, 13 Jan 2021 21:37:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzsCe-0003ji-I9 for qemu-devel@nongnu.org; Wed, 13 Jan 2021 21:17:36 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:42929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzsCc-0003Vk-5V for qemu-devel@nongnu.org; Wed, 13 Jan 2021 21:17:36 -0500 Received: by mail-pf1-x42f.google.com with SMTP id h10so2448690pfo.9 for ; Wed, 13 Jan 2021 18:17:27 -0800 (PST) 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=Hx+ccawlJdzu7GbQDl+NdiAx6KUHgVaeD5cM1vlFohs=; b=ioEcRVLD562KYCAuiTBp9NS1P2W/RaGzMMNHWfEEl6OUCwSCCfMZZ2hFMOrK94wB4m 0C0/xQ9SCFNtFOqrgeXQrbpUEN0HqRUab/8QPSCpr0dDXM7+9YbllFLTl8p+/nrCxVX1 uGrz4gFbr41Fd3EFbAkwWb8+ainfRwOoHqoc+BxM39X6gezp3NEaJkjyaV+nVeqtRVLt GyKbnWiLZTTmOKFOACj6FIrJdzgg+zRWnAyLEYb9VEH//HJdJDGCUNGl3kKQnW7LWtdm FS0gfXSR5uhFj/br8xkoWVZMzFSkXZmwjS1HeX8OxqvLloBXrc7QeCPSN9mnjvO//4j4 0V5w== 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=Hx+ccawlJdzu7GbQDl+NdiAx6KUHgVaeD5cM1vlFohs=; b=Y1ckNDsAptrA6avzhf7h9UWb5F5hIuO79wUfJlX+AJOGHTsRyg0mw1vo+QwJtD/ZwK 1TtLlSapNwLo/P4uJC8/2EJeS5fiY0Y2lFuMEfum17gsGvNKtN6s+vMtK5h9rRJZn5rn iGBi8bQIJpoT1keH2Z7YrNQ5Qv0yBeS7yQaa8aRKfKcmmbxWSUcB8rjajF6c3QJlgqYb 5fsTwkC5fGz8a6QApkv3ryRe5h3AeQhpvFW7gQu7wIb7A52u5YTXavKbDtyi72nFJio6 WNokC5ybKQBQfVVUxZzxVFTGg73/P7Rqhc8LGGJrYVcGBfuX+MeQRAiMWVXp8yPv5X07 RAKg== X-Gm-Message-State: AOAM530bLVMYmA1ooxAMjrV2Vatp8G5haaPlodl+s981sL4LADT+H8ec Rud34dftK7fvlDloxcu47uyI6eqNCjAqmA== X-Received: by 2002:a63:5526:: with SMTP id j38mr4995652pgb.177.1610590646706; Wed, 13 Jan 2021 18:17:26 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id i7sm3771687pfc.50.2021.01.13.18.17.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 18:17:26 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 17/24] tcg/tci: Add special tci_movi_{i32,i64} opcodes Date: Wed, 13 Jan 2021 16:16:47 -1000 Message-Id: <20210114021654.647242-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210114021654.647242-1-richard.henderson@linaro.org> References: <20210114021654.647242-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?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 70a76646c4..43711634f6 100644 --- a/include/tcg/tcg-opc.h +++ b/include/tcg/tcg-opc.h @@ -278,6 +278,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 2bcc4409be..2311aa7d3a 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -593,7 +593,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, 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); @@ -864,7 +864,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, 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 d5a4d9d37c..e9e5f94c04 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