From nobody Mon Nov 25 03:54:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1718830927; cv=none; d=zohomail.com; s=zohoarc; b=H7L1/Zhw6RcSYT7RvnBfoWKHfZFybc/YgXAw3LklXl1ljOVw/eO3fY3h/n2mqxM9F9wcJ2y9dn08BvDoTBTskEIkUF/vyhGcGJ8Ij2+PIWZMMqdRY2TUZJVc3ntVsPEoJ2b5P5pNzM/ZIMSxGH8eUngh8wMtpua4MD8KpDS68y8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718830927; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sJSgr0Lrw8auwaqOO9jWXlr9TbttWDWK1ZwpPbwzIGM=; b=MSiC62ZtGjpsVjC72C6fE4hCjnufe9Y0iqmEE5APPFjxHYkTR41R27eZBHFSPfZ+tQmJnXbfV+rpvTyk2a6bZWdYZl7jybpucyLIknQQA7rZPYMeHpX5XQf5NdNMPHzbOkyo7czLrwALPpOey0gfDT2qU5a3mcJTjb4gNor6vF8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718830927557322.8610175813682; Wed, 19 Jun 2024 14:02:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sK2PS-0002Br-Ny; Wed, 19 Jun 2024 17:00:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sK2PQ-0002AO-4O for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:00 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PO-0000JO-HX for qemu-devel@nongnu.org; Wed, 19 Jun 2024 16:59:59 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-656d8b346d2so158975a12.2 for ; Wed, 19 Jun 2024 13:59:58 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830796; x=1719435596; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sJSgr0Lrw8auwaqOO9jWXlr9TbttWDWK1ZwpPbwzIGM=; b=cH/EVC5NeAVNDE2e5YHkq1FIrmHm7M55IXSHCURsdPgRBMnxvisW8ubOknjTDxiS43 NvNlbN618Ai1ToDryqVLqif9XAk2hNQ1NYVNqD5QmRhgRHE1Jzfxw99AXk7IbAdIHKnx 6fR95Sy0J0Z7FBhAWt74l0ivQ5PrycDh7bEmLg0ssMACbgzDUzoDxg/w1oHvxU4dbxp5 ksYI305jNE56yFJrMzKRUcETIQjY0P/Zm+h0yG/Ol0An7UyN6I/6ceqkhslA4wUWpdaN hPubuvT4oEwCdr441WjbhWHEcW/QWKgjcriHH47CQqI6am+ia1bTTdKpa0A8lXtD21s1 L6dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830796; x=1719435596; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sJSgr0Lrw8auwaqOO9jWXlr9TbttWDWK1ZwpPbwzIGM=; b=ToW+TnwuHMAIVQnL1XVrhBpyMnjHNV9yFh7QFjfqqODmGdpw66ALOdDUKXvkOqKbno 9IlSTMDLdxHZJ0fPTs/EoF1aM8zMPT+2sKe4haXxxnFfG49NRTcS4k9l2IDBPJYlbEmS 8c/BzwMOr5ePM+p3u9L/LxmNNCzcdrcUi3jC1g6NgH0XK125Ok6f79cGIcpC9XN9+Rae 082a9Qz5oHxdlqA36kHt16y8aTZ7Zvx+vMyfHTCBBYOmKE7tU9XOo/8yDGB3LVB4Pki1 uWu1EZqTuqB6mTR2qafZDEFLhD0jcVoFKG2w2/0U3JgVVq2sAddR5UDiUOFqb7PTtVJJ qM1w== X-Gm-Message-State: AOJu0YyfyPvB3V3nbus8Mzm2MN7LgK0Phwcg79LU41FCfyylV1wjdNpl /GI8zDNM+ZRW5wqPXOgALGBNWBf9q67T+opA2TLqCa+DctbRr0UCRx6r3byiBMP1Pdm0XrfAWei 5 X-Google-Smtp-Source: AGHT+IHEsM8zOWPUT/O0bOB9kZVg9/0MFB9A1blGUwdBsosP6zZJMMl/VWpAsBlKamjjRvkrKKN4Gg== X-Received: by 2002:a17:902:db0e:b0:1f9:c3e4:4c0f with SMTP id d9443c01a7336-1f9c3e45052mr7190845ad.34.1718830796494; Wed, 19 Jun 2024 13:59:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 03/24] tcg/loongarch64: Handle i32 and i64 moves between gr and fr Date: Wed, 19 Jun 2024 13:59:31 -0700 Message-Id: <20240619205952.235946-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619205952.235946-1-richard.henderson@linaro.org> References: <20240619205952.235946-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1718830928661100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Song Gao Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.= c.inc index b9078ac793..de5369536e 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -303,11 +303,23 @@ static bool tcg_out_mov(TCGContext *s, TCGType type, = TCGReg ret, TCGReg arg) switch (type) { case TCG_TYPE_I32: case TCG_TYPE_I64: - /* - * Conventional register-register move used in LoongArch is - * `or dst, src, zero`. - */ - tcg_out_opc_or(s, ret, arg, TCG_REG_ZERO); + if (ret < TCG_REG_V0) { + if (arg < TCG_REG_V0) { + /* + * Conventional register-register move used in LoongArch is + * `or dst, src, zero`. + */ + tcg_out_opc_or(s, ret, arg, TCG_REG_ZERO); + } else { + tcg_out_opc_movfr2gr_d(s, ret, arg); + } + } else { + if (arg < TCG_REG_V0) { + tcg_out_opc_movgr2fr_d(s, ret, arg); + } else { + tcg_out_opc_fmov_d(s, ret, arg); + } + } break; case TCG_TYPE_V128: tcg_out_opc_vori_b(s, ret, arg, 0); --=20 2.34.1