From nobody Thu Oct 31 00:23:40 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=1623660638; cv=none; d=zohomail.com; s=zohoarc; b=QccA25eprpbdfzkG6ui/bXh1+ScThYtABxr6v9sFziHpFP8DBVg3NlLZg68dpbjcJcorBcobQdrMGHa0B8AXbDbq90hIGeK72psyKmYtReqDxA8yj3qK+TauNaWbIuKWMoAHnqr4fgPT/Jckm5tMi7qZM04e3sbAy9UwkruT7xQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623660638; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g2DFsQ9t433IY1mkuvqi2WafpHFJU1Gt4g42MrkG5qo=; b=PhC//p5DnM2fLWEWTNAv36sc6gZu3YRi0iucPJlPEiah2MEZB7PQ45/J1lUe8zTpmjZ7ZjIEK2LehqatLVS6+CFYJPsKVlocUgxaQXFwMBdJYDMS3lZ82jh/6B6qmMRSf61nL3Nr+u9ezlg39jYikicwX2UJKMyfo9BiDvhvwA8= 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 1623660638200758.8093949447791; Mon, 14 Jun 2021 01:50:38 -0700 (PDT) Received: from localhost ([::1]:46004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsiIn-0000ko-3V for importer@patchew.org; Mon, 14 Jun 2021 04:50:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsi6z-0002ZI-80 for qemu-devel@nongnu.org; Mon, 14 Jun 2021 04:38:25 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:51776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsi6o-0003cI-Nr for qemu-devel@nongnu.org; Mon, 14 Jun 2021 04:38:24 -0400 Received: by mail-pj1-x1030.google.com with SMTP id k5so9290007pjj.1 for ; Mon, 14 Jun 2021 01:38:13 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id h20sm2242022pfh.24.2021.06.14.01.38.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 01:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=g2DFsQ9t433IY1mkuvqi2WafpHFJU1Gt4g42MrkG5qo=; b=p4qNBABVLziCoaM19gFNyEfMX9hF9sPnK/Mh2pGjI80ZPA+zal2RKhId6J+rv0z5uR l3OAFyUbzQ7AyFOR5XfcCQu5BL/AHTJwjgyMiqpqUsb1IUgyGxlkDDN5fSOZ3GOASxdA OwROQcvqanK0q/1ikBahACu26T4IDA3tc6EdcKFIGcO4JVgNFpMSibIJpUwwOF977FT5 OEBDIIsWX3G8oEb61hGMIRtt20XAqyVoz2S3pW65yDjs+AfIXc4fkJjn1dFlCSrWuNo0 Fgcgo7MFQMKW6sIlda05x254o8IOIJXQgk82d4pf4dT9d3RvqO/id2JHpDs7TB+BqUa3 Wt1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g2DFsQ9t433IY1mkuvqi2WafpHFJU1Gt4g42MrkG5qo=; b=Km92Nz6PqAYCvzlST/lLwTgY3z0E14FHpvLHpWhhAF2fF4OORxuO8hV9jP4LFDuYUB 3pb0/sGmhw6vIS3/EtEmzOuea0iKQWExIfFIzwGGBVYVMdxJA1zZRwyMra/JVeN/4c4j 3BvRMaAxZ1q5HKWiJf0+7QMBNUCpy3NpJrfnJOtoz8guMeXXYstKWX+dxE+qfafVmkY5 z4e41CQf0NkPOInb6O+whO0RyTgINekt9qaiakQg9xgvdf6OOUrltWWZltyf/oSYpC3F 4MDUcM7I54s27LcAnXl5bwsSAlaBPieZeFbz8PD/bGBHZeYJJdpskch/Y6TITTratHwS 0lsQ== X-Gm-Message-State: AOAM533ueXG6QQ2P8JwP/i7kfNgte8iBBaa+IEoWqPk1f8miGw4uw/Ks uka42/APp/VWzYUdHGWeXbJd5rM37FIllA== X-Google-Smtp-Source: ABdhPJwvtTB/7eTM93I4lDcvSP9SmWd56ofZsi3LOwRLYsNGKqp0W81ePkAjCvs3MZC1IZ///iOk1w== X-Received: by 2002:a17:90b:18d:: with SMTP id t13mr22654673pjs.191.1623659892812; Mon, 14 Jun 2021 01:38:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 19/28] tcg: Make use of bswap flags in tcg_gen_qemu_st_* Date: Mon, 14 Jun 2021 01:37:51 -0700 Message-Id: <20210614083800.1166166-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210614083800.1166166-1-richard.henderson@linaro.org> References: <20210614083800.1166166-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::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" By removing TCG_BSWAP_IZ we indicate that the input is not zero-extended, and thus can remove an explicit extend. By removing TCG_BSWAP_OZ, we allow the implementation to leave high bits set, which will be ignored by the store. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- tcg/tcg-op.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index 702da7afb7..5dbcd1b0cf 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -2915,8 +2915,7 @@ void tcg_gen_qemu_st_i32(TCGv_i32 val, TCGv addr, TCG= Arg idx, MemOp memop) swap =3D tcg_temp_new_i32(); switch (memop & MO_SIZE) { case MO_16: - tcg_gen_ext16u_i32(swap, val); - tcg_gen_bswap16_i32(swap, swap, TCG_BSWAP_IZ | TCG_BSWAP_OZ); + tcg_gen_bswap16_i32(swap, val, 0); break; case MO_32: tcg_gen_bswap32_i32(swap, val); @@ -3013,12 +3012,10 @@ void tcg_gen_qemu_st_i64(TCGv_i64 val, TCGv addr, T= CGArg idx, MemOp memop) swap =3D tcg_temp_new_i64(); switch (memop & MO_SIZE) { case MO_16: - tcg_gen_ext16u_i64(swap, val); - tcg_gen_bswap16_i64(swap, swap, TCG_BSWAP_IZ | TCG_BSWAP_OZ); + tcg_gen_bswap16_i64(swap, val, 0); break; case MO_32: - tcg_gen_ext32u_i64(swap, val); - tcg_gen_bswap32_i64(swap, swap, TCG_BSWAP_IZ | TCG_BSWAP_OZ); + tcg_gen_bswap32_i64(swap, val, 0); break; case MO_64: tcg_gen_bswap64_i64(swap, val); --=20 2.25.1