Message ID | 20210204015529.885398-1-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp868902jah; Wed, 3 Feb 2021 18:55:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1NB24m69d2NF33sEEONWS1DA2ZrpmwNlV2ewZ/FwDCyyyxAzDaDJeLojf8Xn2OqZdLZ9I X-Received: by 2002:a25:6191:: with SMTP id v139mr8880352ybb.396.1612407300984; Wed, 03 Feb 2021 18:55:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612407300; cv=none; d=google.com; s=arc-20160816; b=X09yb6twrlNoST+ab2BK5DJ3O1Vz3NVmYA2RjThA8dTuR/GiSyDWPEjG2rf74f8suO +5HIPCeUAFc98RPkZ/gEaif/yZjapSwYeKKCHH2oqNHw4wydqL0IctCTKNdxbLFNR8h+ d0xzp/3ajfF+6FNx0dkrF+5alR76MUKg7Lz/dbG7iJlvxUKY16vDaplBRojANdVm7cX1 6j969VJ7LkdQ2sQUED9OC7rYq1kUk3jDXwJNn4dqeQX+a21L2jzjU2HMC/fNd4HMSOdQ 7YCNc2/yOPyVbBigVb44QoPvJnamjoSn6DLl6NQxp6h7gbJ002B7AWdJEYHpPsKqSKvd kyMQ== 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=nbzdCRnUzVvHAlHdm0W/U/kL5Ps02KKsV67u0VtR3Rc=; b=F4Y2M03rjkDapRK8HJN2Ug0I00u94WznoGOKMDHcDV9CgpHADIbNuDXgiK3doGktxm aX3q3V5TOcz92xGsnsV9nyxD7zPCnSbOgTcmLV4J58mgAmxwG98OxfJEnBkNcOgTKjCI EnWgpQBrBInqjqFJrzFjGnl6v/L7kXoUhbjUugf1SvTGanvercRoBZZgFxHnMLl18klW ldQjqxGj/alJv/+/RlenTD7cScAlIEsvzWlX7kbEl7RNpEfNWA/rqMplb9yWKBlyxIyO WobjFdQKbYj5/S2e7srPSaBgba9VXOTkt5o+KIB5Ke+cahnaIMEhaz7pMM26i3pSjtqY lwvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ggDMgUJC; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v19si3948652ybj.479.2021.02.03.18.55.00 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Feb 2021 18:55:00 -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=ggDMgUJC; 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]:52898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1l7UnM-0003A9-4b for patch@linaro.org; Wed, 03 Feb 2021 21:55:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1l7Ts2-0008QX-Le for qemu-devel@nongnu.org; Wed, 03 Feb 2021 20:55:47 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:34232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1l7Trr-0006gq-HH for qemu-devel@nongnu.org; Wed, 03 Feb 2021 20:55:43 -0500 Received: by mail-pg1-x534.google.com with SMTP id o7so1065897pgl.1 for <qemu-devel@nongnu.org>; Wed, 03 Feb 2021 17:55:33 -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=nbzdCRnUzVvHAlHdm0W/U/kL5Ps02KKsV67u0VtR3Rc=; b=ggDMgUJCODLaNK20KTZ1hBgRwL0Bo2KBembs38je25CjqPME7osnBWSquewY0Sitil BTniQOkI3vG98OVhlMyPNYv0yjX/EFr+JqxrKd3pAepgkbymMtfvXmR6FGT/kJ28Xthe q9htpFJ+NI/fJSWAamzRjrJNOszAoBZnsh4TPScxb1c9/rn1ECIyL2RgYEXk/vwqP+YC UORsrQYNPuy5SdSBn0glhNlIb8iNDBWFJ4tILkm425nCGKwr0gG7q7i9zWsAFV+1BdZO yYrjOVtaJzSy1xRgejF+ap7CLGsvKWe1cCW5tDmor1y9amplnMXlpQitNo62klLD3seA DINQ== 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=nbzdCRnUzVvHAlHdm0W/U/kL5Ps02KKsV67u0VtR3Rc=; b=EZ6GlL/DHNznnuNNCTtuxKCvHFFn4kxaamNLsnS3ndHcLuOVai8ijYQ1qNrcdXC8AW sidCs/1VCDAbqTPC9JgTt/H9Zk3rGNLEzuwAZamU6htaQZOVqK5nHguNnus6y867A1Rs a2OCZGdmypeo/TLQBTcci9V6XTamJ/EKn221MCcTfewdaldkTnduR/maoNridP404UIv uUIpWbl3R3XAvnjIdrQLLm1UIqOXE2w+WOpcqdsiQWfMDV+kFVrbzKDfRytZzXFajc2H UoTeWm8J5Mjc77is6WYDmY1cbAui2K2JrI9xILyg1mt0V5WgL4JzZ5js6arMcI8S+ne7 F42g== X-Gm-Message-State: AOAM532YkrVNx0Q9i6OAYr75BFxrWA5B77wCxmso8XYTyxJHq/zYu5aP PVkPz0ko4xOvca+ANmihVeWTqZS8JekE3QS+ X-Received: by 2002:a63:ab4f:: with SMTP id k15mr6134100pgp.280.1612403732956; Wed, 03 Feb 2021 17:55:32 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id j4sm3538230pfa.131.2021.02.03.17.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 17:55:32 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v2 82/93] tcg/tci: Split out tcg_out_op_r[iI] Date: Wed, 3 Feb 2021 15:55:29 -1000 Message-Id: <20210204015529.885398-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210204014509.882821-1-richard.henderson@linaro.org> References: <20210204014509.882821-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: sw@weilnetz.de Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
TCI fixes and cleanups
|
expand
|
diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index e4a5872b2a..c2d2bd24d7 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -324,6 +324,31 @@ static void tcg_out_op_np(TCGContext *s, TCGOpcode op, old_code_ptr[1] = s->code_ptr - old_code_ptr; } +static void tcg_out_op_ri(TCGContext *s, TCGOpcode op, TCGReg r0, int32_t i1) +{ + uint8_t *old_code_ptr = s->code_ptr; + + tcg_out_op_t(s, op); + tcg_out_r(s, r0); + tcg_out32(s, i1); + + old_code_ptr[1] = s->code_ptr - old_code_ptr; +} + +#if TCG_TARGET_REG_BITS == 64 +static void tcg_out_op_rI(TCGContext *s, TCGOpcode op, + TCGReg r0, uint64_t i1) +{ + uint8_t *old_code_ptr = s->code_ptr; + + tcg_out_op_t(s, op); + tcg_out_r(s, r0); + tcg_out64(s, i1); + + old_code_ptr[1] = s->code_ptr - old_code_ptr; +} +#endif + static void tcg_out_op_rr(TCGContext *s, TCGOpcode op, TCGReg r0, TCGReg r1) { uint8_t *old_code_ptr = s->code_ptr; @@ -550,25 +575,20 @@ static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg) } static void tcg_out_movi(TCGContext *s, TCGType type, - TCGReg t0, tcg_target_long arg) + TCGReg ret, tcg_target_long arg) { - 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_tci_movi_i32); - tcg_out_r(s, t0); - tcg_out32(s, arg32); - } else { - tcg_debug_assert(type == TCG_TYPE_I64); + switch (type) { + case TCG_TYPE_I32: + tcg_out_op_ri(s, INDEX_op_tci_movi_i32, ret, arg); + break; #if TCG_TARGET_REG_BITS == 64 - tcg_out_op_t(s, INDEX_op_tci_movi_i64); - tcg_out_r(s, t0); - tcg_out64(s, arg); -#else - TODO(); + case TCG_TYPE_I64: + tcg_out_op_rI(s, INDEX_op_tci_movi_i64, ret, arg); + break; #endif + default: + g_assert_not_reached(); } - old_code_ptr[1] = s->code_ptr - old_code_ptr; } static void tcg_out_call(TCGContext *s, const tcg_insn_unit *arg)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/tci/tcg-target.c.inc | 50 ++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 15 deletions(-) -- 2.25.1