From patchwork Wed Apr 22 01:17:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 185638 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp170497ilf; Tue, 21 Apr 2020 18:32:09 -0700 (PDT) X-Google-Smtp-Source: APiQypKF69vJW9sbIls5sUROVGXLqSGRyu/OggMQlTQAMVQIsqMZVy44+ABQlWLaSUv+2n9Zm6eQ X-Received: by 2002:a0c:8045:: with SMTP id 63mr12925411qva.68.1587519129072; Tue, 21 Apr 2020 18:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587519129; cv=none; d=google.com; s=arc-20160816; b=mNUDLOTgmxDqi7VMIEpg8szSfb9yLd/z4xo0jPbkptU8TBK6uuUhHNRA5cX5tfRvgl m9nkgUCQU0YtuzCDl1vnAMfxKrjjM0wYh84BAwDuoPzmwnpoR8c0vFZeURAjhjhYKESC rlKeXSkvrQFImOadR4XZAp0N5dyUvqo7ZmrrCbfBRVW+J5S9EKaM8GrQQvlfEfCYjBGM RZ/7Xt657xOOzf7MMazi/6bxr/FXeVRdSzWpvEJxE74BZ77IeOU1yKkwXx0MvTdNreT/ eHfYIFGjWqmRZzpb/yOU5AQb9gOZORY3URDhka4QZUGDGg4R0PWk+4hSQ28me1RLlT0c lNBg== 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=Zdjt8WpN4waxB25J3ykCncF8gpDtxEJVdnhsqarrM50=; b=07YDQz6/KPY8temvRs42oPyB1QJIiJ4jv2G0n+4l9GumVfBgCUgI7NDoq9pFJg8B/K eFvKq66DFm2oKjX5f2GbYPX3rlsmEFX0N3huxLLxnxf6P60Si+HBvIzBnUwWOhp0swWb ZTjDfQveUhH9wfGXd+be1tVxNcld89D2WQd3woSTvvaeKEETHcA+O6kduva6gHK5oGRN XGZk+3XxPrZzGdPIq0FWs2NNx0eP+0+WOtpN5O/L0ciKzanzvCy7Bggb+qo3newBNSqe 2Nm2mM0zfrODI3PLR3assOGhFVLNaYAMgSX7qAkhzspXyJM0ADw1rghciDtkSTK/TE06 blvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l2OnSAIN; 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 1si2486627qkr.85.2020.04.21.18.32.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Apr 2020 18:32:09 -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=l2OnSAIN; 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]:38942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR4FE-0000vI-GS for patch@linaro.org; Tue, 21 Apr 2020 21:32:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35276) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR41P-0001jO-G3 for qemu-devel@nongnu.org; Tue, 21 Apr 2020 21:17:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jR41O-00024n-TO for qemu-devel@nongnu.org; Tue, 21 Apr 2020 21:17:51 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:38199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jR41O-00020C-9Q for qemu-devel@nongnu.org; Tue, 21 Apr 2020 21:17:50 -0400 Received: by mail-pj1-x1042.google.com with SMTP id t40so156428pjb.3 for ; Tue, 21 Apr 2020 18:17:49 -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=Zdjt8WpN4waxB25J3ykCncF8gpDtxEJVdnhsqarrM50=; b=l2OnSAIN9pOZW3QTTeJHLAmMDjVXaAEqy5iGvIzdKy6Kk3WssrUciwF8eKy+p4Ux6R D0Y5T+tPVvPoWpsNe10lRgoaYhs7tY25QLePjuzT5/437kYPXv8iFs808khZ62moO+d/ E79IpJKsUUCSSb8h+jkljmO2/ckjpOmW9dQtqjfx2W/rMSATTGCoOPTc7y23Q/MP7MpT 0DgfhEXVPvTkobPtxu5jb5B8pRlP5YxU6g8oSP2lPGT2/teSFQnYL1JbYz1FMbnmLyvj ALx7VzwWLnXaQQZXKZWkE6apIGcbpGsZvgOivN54jxbX2QltzF1Zqe7yzDOLC1Myo5Lf AIvw== 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=Zdjt8WpN4waxB25J3ykCncF8gpDtxEJVdnhsqarrM50=; b=PPOmWp4ghmUt8sb8n1MxrWVbxq4M8F8xQSzsi0AfsLHEnrhAMaODoM9yROb7MzYEkW 2aTK7Fg1vHZ7S0HUp4VuDq9XHfh9LK8QnPhLimjbareI96UqaCU9UYqnIHZsGwMTNIva mSblsbz9dwtnmxAUJ6LcYBfCMkPKiGdeRhqD2Q/62aXmP8cUo+NEO0LW3coRCFeK0wuS gCw5cWuoLthQ3Bp90areOkwah+Ki9fR83EbFjzIWf//s35+rxf84WvuH6Q+5SHOt7Cno r3GAhgnP8xwQ6xHiqTCSQNh+unPUdjUFzGMNTKiSe9aAc4fF3ocX4hzUy1WUyOTUmUUE K/Lw== X-Gm-Message-State: AGi0PuYGIRCv1Y2psrsF79RTjr8F6RZhJk1gKID3Sk2BQlC1hNDa7tZr MWM7Nr6w1YtxF3KTWr2EbQG6evfPHDo= X-Received: by 2002:a17:902:7b96:: with SMTP id w22mr24706428pll.10.1587518268604; Tue, 21 Apr 2020 18:17:48 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id m4sm3673561pfm.26.2020.04.21.18.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 18:17:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 19/36] tcg/tci: Add special tci_movi_{i32,i64} opcodes Date: Tue, 21 Apr 2020 18:17:05 -0700 Message-Id: <20200422011722.13287-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200422011722.13287-1-richard.henderson@linaro.org> References: <20200422011722.13287-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::1042 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. 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 Reviewed-by: Alex Bennée 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