From patchwork Fri Feb 2 05:50:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 769162 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp754700wrc; Thu, 1 Feb 2024 21:56:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHK4EqbWQhiwX6kQqLbC7vlZIbE4PP2zxoeAI+B2pLE78mw+l36H7LLyRrPKmHKBWkwbEWm X-Received: by 2002:a05:6102:5d7:b0:46a:fd09:211b with SMTP id v23-20020a05610205d700b0046afd09211bmr1075512vsf.20.1706853383771; Thu, 01 Feb 2024 21:56:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706853383; cv=none; d=google.com; s=arc-20160816; b=vi1EyQ/0x2wvhyK4jOp4cFqsJi6EccuFdmoIYhCX+mmMojFhbwHvbSbLZoUI/4NLrV p1iJtdL3n0QzHEQTzPTRxVTAHQFayWJkRP1HpZQZxMuZAWGchO8V2cTwCDoxy/b4ze97 uzvoyW0yJAvCjj1j0618czSz2u4NRr8VPw4bcn3fQkmuAg1dRiKsVjIkt76hvaBVBy27 XdoEBVAXfqSJhsM+IZmaq3O2JHR9I1Q2qpgMVT6RfFp6PX9SLsaEoOnBBeuC2k07rRHO Xq30vi7q9hrU06jZgV9nhO6yR53sQQFftNrifeEQnbhEC2rhOqgu2HFM6NcqUbwg9GCL UdRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=wMA0Lk36Fd1VwYxsHHHznBGVGpg1MsjG0n+eTevqqnA=; fh=P9AM/7IhNopeLT/TAkRtLFs8OZjhNHKOwUfO9ciqMwk=; b=CiowENGKbb9HfF2ib6OlibSo5vuDU+ahJzc+J4nt5E4RtbIK4LVMxFFMLFoFWy/4Ts 9Pm5MUW3ERoxHU6clSNunW6xBe/wREsDJHJZVQl1hvXWoSfVoG/up7WuWPWrVNk4VcAW q3cEY7HBiJn60GnfkPLl7mNBlsXb28529Mly631M5Gg3y7K+7Wf+A9rBeqsLr2TUEQCz j6BPK2msT9+QNZjAHEdqN9sac29blJ+c8NJtfmCqnTUfwzdcC+kS9TfCrea2g6LeOgzG EgdDsMYeXXvqVKWW93TLIuNr++41cqW1pIUbHT9QeFub/sklQAO/iNtfQtyAoCmB30bZ t6mA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YTCcuM7X; 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 X-Forwarded-Encrypted: i=0; AJvYcCUSzfD6vnuhJ67gb3oySwOFJTY/9eZ6uQwCo8IeY8u0ODnGUJakG9s1pMkdqcPGKMcXXTAa0WTBNltNYUsigllm Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d12-20020a056214184c00b00686a095c9b8si1193173qvy.582.2024.02.01.21.56.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Feb 2024 21:56:23 -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=YTCcuM7X; 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] 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) 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-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== 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) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use them for trans_FMOVq. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé 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, unsigned int dst) return cpu_fpr[DFPREG(dst) / 2]; } +static TCGv_i128 gen_load_fpr_Q(DisasContext *dc, unsigned int src) +{ + TCGv_i128 ret = tcg_temp_new_i128(); + + src = 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 = 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) static bool trans_FMOVq(DisasContext *dc, arg_FMOVq *a) { - int rd, rs; + TCGv_i128 t; if (!avail_64(dc)) { return false; @@ -4628,11 +4644,8 @@ static bool trans_FMOVq(DisasContext *dc, arg_FMOVq *a) } gen_op_clear_ieee_excp_and_FTT(); - rd = QFPREG(a->rd); - rs = 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 = gen_load_fpr_Q(dc, a->rs); + gen_store_fpr_Q(dc, a->rd, t); return advance_pc(dc); }