From nobody Wed Nov 27 19:50: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=1697668187; cv=none; d=zohomail.com; s=zohoarc; b=SxHpRAMgn0OChX5NXrP5T94BmfdzrpWvyGoPEv7UR734taviyypjeIurQJqeNaQc7cdoJB5RGqor2V9rxVPkM+85k3WmnzNHZxjh8azl9Enzg2DzO3YEf6lgunidq9xPJA3A0jOgnZjcxCVFKnSHmYX0JApxDeUTFD2q1sqjprk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697668187; 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=i+3c/q3YHMTCq7WXcy5yo10z7tmQCbWln7ShYoiyjhk=; b=h6h7MoaxF6ZRzgknXMMWQy3I2iJMGHe7qPuvRbFa3Y+0XTlwSLfkGRaaCMCs/idkVPm+CBaJH7dOJOtD1rWTjZecKJNIQkzfWeX2zocFt3/R0IhJsPuLOdx/8WIuduMbSRDu91CpGVqZGSigVkWp+qO1bsQHWTaf5b6lIKm771E= 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 1697668187090626.4288088121649; Wed, 18 Oct 2023 15:29:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtEzm-0008E6-Dj; Wed, 18 Oct 2023 18:26:30 -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 1qtEzi-0008Cd-Si for qemu-devel@nongnu.org; Wed, 18 Oct 2023 18:26:26 -0400 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 1qtEzg-0002Wu-Ry for qemu-devel@nongnu.org; Wed, 18 Oct 2023 18:26:26 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1c0ecb9a075so51284725ad.2 for ; Wed, 18 Oct 2023 15:26:24 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 13-20020a170902c24d00b001b9d95945afsm431058plg.155.2023.10.18.15.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 15:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697667983; x=1698272783; 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=i+3c/q3YHMTCq7WXcy5yo10z7tmQCbWln7ShYoiyjhk=; b=lL2j41WC81p7BdVmwpZb9bTmWMsxHzIovu9uQ3Wc68cnFVYdoCEjj2xb6FM4zM5CJ6 PcNGCMAM2Piaox1q1nw3IseALeuHGXVMHizQU+f1USlCWLWFxhLrJ7FrpUNr4/zy2f8J tQ8Ts0tXANQdz2X5x77mWCEIimsz8/DTr9VEh1YO9VHAObcKmWLMKvbpYS7BQAOSwWRG OFhzTbqE/t3nriSAaSWv7yiwG+SAfYIIeVtaVrtLgJY1Myjj4RKKgbuHb9SDVWW6xGHo /h5KD5jabX8pHkc7Ak0v40jEdXdZsYMkCNjIYNEu2gGWjlnIOh+M3BKHD0cqnct+l6Hr ctBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697667983; x=1698272783; 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=i+3c/q3YHMTCq7WXcy5yo10z7tmQCbWln7ShYoiyjhk=; b=gnrc5lFZSY5K+cv72Y6l5N3ujGVY66rgSS2Xr5XufUkYH6YcXBV0vv24OnJj4jSK/j rTQ9Q+Eft3gV2SjzQL82svhQULv5kepCMSFpagoX7QbJVilHS56gIyGWsRBQ9xVlDOP3 kkakaHkjTJx24UFsN2bppDh5FZklksTID6XWcCIoQIgOOYW5Rg13+QdVrgnV2XdLKJNd Y90epTnlUpw5/9KK9ZonYxEojUulWb338NxRhVL/L9Ujc+nN8nCkQpXzV9vOyzYIAHNT OEtAS30M7aGNOUG+F5w4M5LpCXqcnxHkwSoX22lWSPQvj5AMLKrJl2jOq+sgv1xHfMhr jFMA== X-Gm-Message-State: AOJu0Yy6jevPwjmDQ5NAmsU8hJd+EIqCXra7SP4Oc4jyhoj7ugc3/t87 WHB8VsjRS3ASes9G3sL2ZuwEBHKi171DcLKzAe0= X-Google-Smtp-Source: AGHT+IG6/aHbuZlW4w+aTI5xLmj2t6mqr6LPD6JM/SFFoQ3L/NYWauhz5JsP2CS1BYeWWH4+77CoCA== X-Received: by 2002:a17:902:ce8a:b0:1c7:7b27:f9a9 with SMTP id f10-20020a170902ce8a00b001c77b27f9a9mr784385plg.59.1697667983472; Wed, 18 Oct 2023 15:26:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 28/29] tcg: Add tcg_gen_{ld,st}_i128 Date: Wed, 18 Oct 2023 15:25:56 -0700 Message-Id: <20231018222557.1562065-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018222557.1562065-1-richard.henderson@linaro.org> References: <20231018222557.1562065-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 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: 1697668188947100001 Do not require the translators to jump through concat and extract of i64 in order to move values to and from env. Tested-by: Song Gao Reviewed-by: Song Gao Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg-op-common.h | 3 +++ tcg/tcg-op.c | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/include/tcg/tcg-op-common.h b/include/tcg/tcg-op-common.h index 2048f92b5e..56d4e9cb9f 100644 --- a/include/tcg/tcg-op-common.h +++ b/include/tcg/tcg-op-common.h @@ -747,6 +747,9 @@ void tcg_gen_mov_i128(TCGv_i128 dst, TCGv_i128 src); void tcg_gen_extr_i128_i64(TCGv_i64 lo, TCGv_i64 hi, TCGv_i128 arg); void tcg_gen_concat_i64_i128(TCGv_i128 ret, TCGv_i64 lo, TCGv_i64 hi); =20 +void tcg_gen_ld_i128(TCGv_i128 ret, TCGv_ptr base, tcg_target_long offset); +void tcg_gen_st_i128(TCGv_i128 val, TCGv_ptr base, tcg_target_long offset); + static inline void tcg_gen_concat32_i64(TCGv_i64 ret, TCGv_i64 lo, TCGv_i6= 4 hi) { tcg_gen_deposit_i64(ret, lo, hi, 32, 32); diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index c29355b67b..b4dbb2f2ba 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -2880,6 +2880,28 @@ void tcg_gen_mov_i128(TCGv_i128 dst, TCGv_i128 src) } } =20 +void tcg_gen_ld_i128(TCGv_i128 ret, TCGv_ptr base, tcg_target_long offset) +{ + if (HOST_BIG_ENDIAN) { + tcg_gen_ld_i64(TCGV128_HIGH(ret), base, offset); + tcg_gen_ld_i64(TCGV128_LOW(ret), base, offset + 8); + } else { + tcg_gen_ld_i64(TCGV128_LOW(ret), base, offset); + tcg_gen_ld_i64(TCGV128_HIGH(ret), base, offset + 8); + } +} + +void tcg_gen_st_i128(TCGv_i128 val, TCGv_ptr base, tcg_target_long offset) +{ + if (HOST_BIG_ENDIAN) { + tcg_gen_st_i64(TCGV128_HIGH(val), base, offset); + tcg_gen_st_i64(TCGV128_LOW(val), base, offset + 8); + } else { + tcg_gen_st_i64(TCGV128_LOW(val), base, offset); + tcg_gen_st_i64(TCGV128_HIGH(val), base, offset + 8); + } +} + /* QEMU specific operations. */ =20 void tcg_gen_exit_tb(const TranslationBlock *tb, unsigned idx) --=20 2.34.1