From nobody Tue Nov 26 14:52:10 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=1706853384; cv=none; d=zohomail.com; s=zohoarc; b=Wzy+id1C8jWoODAsdGbHmTLUo1BqJBwlx18dWpypDKd6hzMXEcg2RmjUyHU14wF1flOY588vhpALUmN0m7s3HzUFKCakyrkwCt//paCvL5dR1KqHjd5dVpgNl25dxwYorO8DPG1/8lL5umto/kN1UGBj5OH67iqFSRblZPqOeWw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706853384; h=Content-Type: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=wMA0Lk36Fd1VwYxsHHHznBGVGpg1MsjG0n+eTevqqnA=; b=itsOSoaPE8xcZq5np4tvx1mnuYEJdoQPyHqt0XC7yiWAg27FDNj6HnTRibz8YWSyC0txN+MHS1AyFFYFsh2C1oUGG5b1K0lf5RtPVBWPv9fBZ9aE5Q9G2sNe2AW8LnIEUoChpAdm0t7L3rmKb7Zhq74dHjlMMqd1e6oQAD/Fgkc= 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 1706853384117989.2149197942814; Thu, 1 Feb 2024 21:56:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVmW9-0005OY-Mq; Fri, 02 Feb 2024 00:55:13 -0500 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 1rVmW8-0005KQ-4m for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:12 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmW6-0002uz-8r for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:11 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1d7232dcb3eso13085405ad.2 for ; Thu, 01 Feb 2024 21:55:09 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id je5-20020a170903264500b001d8a80cbb15sm752059plb.238.2024.02.01.21.55.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853308; x=1707458108; 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=wMA0Lk36Fd1VwYxsHHHznBGVGpg1MsjG0n+eTevqqnA=; b=YTCcuM7X2MKgH3Ng0t1D5I9ijyRwlMKRbWljKgf0iXdqnVmb6TIBTH3ywx53JP88/3 Rxb6Bj2vfqSsChuNoLpRlpAMNopcGkLazUT94Q79HycJZ15DAA9g0NZqDhp+as8rAO7G rcOPb9GjuD5/L2oD9ZihzQ7IBQ7xFeWOOtMJA0pw4C9ZJ6t/EpU3vX0SP4C9NUwGoEzs 2TOjidnWt4AmjfixEF+rJCpaozJpDW3fuIdK7MeQV5kv/lqALQF57aP5BWm0vk6UfcC1 a0LWXppJVGSoBLpGNRlhUYKhY/PUtsvB0LgGqKlP87KlVcek8kHLOB2E53npNk+xnILc f6lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853308; x=1707458108; 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=wMA0Lk36Fd1VwYxsHHHznBGVGpg1MsjG0n+eTevqqnA=; b=c4XuEim1URdCoig8xBoxBbD4lnBFuannKtZc/ty4ORHmuNW24YfAdZJXOV95nmoyq5 ixMl/vfdGE3Otu+1meGBNZ64Yuipj2X4+80qmKqOP7YrCOCYA6VR7VWrN9ZjAouhDuZl ePzigWgi/gSQ8xR+V2rLjYXatFBUyDcVEEfW+iKqEcagK+QpBtArCzKTa7i2HpE3OW9Y wIT2dA82tpnVSX2ClV+EVG00GTiG3QXsm3Alcl+v9kwkRG5A2nxPjXg0DabHylCUp6Kw JGKJitZLTb/EhCDUilaAw5meCssnAxjiEZJNWkWwcA8TObdIJsEsIaO/j6EuuEHqwopq SGfQ== X-Gm-Message-State: AOJu0YxM2+rIPlXPPBr+IEorasQ7vpbk+yTmZDjmZvqw800542cLlzFa vvJN+4+maTwpQkp3RFmWbd5422n8Q3oObVb2Z7aguW6byhzNzx9nLIZ8m9IEzE8Ra2FfHRJTfpd s5GY= X-Google-Smtp-Source: AGHT+IHBuwnC+L6I4AjIhaK0dpXIlbk9usstKsQ90l8bk5cVVWZZ/giS5jkrehM29qNBpUcdHNRzwA== X-Received: by 2002:a17:902:d2c4:b0:1d9:fbe:466e with SMTP id n4-20020a170902d2c400b001d90fbe466emr1714804plc.66.1706853308630; Thu, 01 Feb 2024 21:55:08 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXOK9uOC5dZiAh9TM7kvnRV54p6rFR1Fei+yyOYAnItVwRsEH6f78SP4nS2lMez4/FSSkKBC2lFw+5Y71WbY26H/QCYz78q0mD/pTMb7Q== From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Mark Cave-Ayland Subject: [PULL 39/57] target/sparc: Introduce gen_{load,store}_fpr_Q Date: Fri, 2 Feb 2024 15:50:18 +1000 Message-Id: <20240202055036.684176-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202055036.684176-1-richard.henderson@linaro.org> References: <20240202055036.684176-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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: 1706853385408100013 Use them for trans_FMOVq. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Message-Id: <20231103173841.33651-5-richard.henderson@linaro.org> --- target/sparc/translate.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 6824b5d835..c68f6ca94e 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -264,6 +264,22 @@ static TCGv_i64 gen_dest_fpr_D(DisasContext *dc, unsig= ned int dst) return cpu_fpr[DFPREG(dst) / 2]; } =20 +static TCGv_i128 gen_load_fpr_Q(DisasContext *dc, unsigned int src) +{ + TCGv_i128 ret =3D tcg_temp_new_i128(); + + src =3D QFPREG(src); + tcg_gen_concat_i64_i128(ret, cpu_fpr[src / 2 + 1], cpu_fpr[src / 2]); + return ret; +} + +static void gen_store_fpr_Q(DisasContext *dc, unsigned int dst, TCGv_i128 = v) +{ + dst =3D DFPREG(dst); + tcg_gen_extr_i128_i64(cpu_fpr[dst / 2 + 1], cpu_fpr[dst / 2], v); + gen_update_fprs_dirty(dc, dst); +} + static void gen_op_load_fpr_QT0(unsigned int src) { tcg_gen_st_i64(cpu_fpr[src / 2], tcg_env, offsetof(CPUSPARCState, qt0)= + @@ -4615,7 +4631,7 @@ TRANS(FsTOx, 64, do_env_df, a, gen_helper_fstox) =20 static bool trans_FMOVq(DisasContext *dc, arg_FMOVq *a) { - int rd, rs; + TCGv_i128 t; =20 if (!avail_64(dc)) { return false; @@ -4628,11 +4644,8 @@ static bool trans_FMOVq(DisasContext *dc, arg_FMOVq = *a) } =20 gen_op_clear_ieee_excp_and_FTT(); - rd =3D QFPREG(a->rd); - rs =3D QFPREG(a->rs); - tcg_gen_mov_i64(cpu_fpr[rd / 2], cpu_fpr[rs / 2]); - tcg_gen_mov_i64(cpu_fpr[rd / 2 + 1], cpu_fpr[rs / 2 + 1]); - gen_update_fprs_dirty(dc, rd); + t =3D gen_load_fpr_Q(dc, a->rs); + gen_store_fpr_Q(dc, a->rd, t); return advance_pc(dc); } =20 --=20 2.34.1