From patchwork Tue Aug 22 11:01:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 715741 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp193060wrp; Tue, 22 Aug 2023 04:03:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4nvao5LPXMb/Uz//wYFBA8Jr9oiEmr0ySNxBfDb6OWyoccW42EsRidm9Gc1kGpcNfj/vD X-Received: by 2002:a05:620a:389e:b0:765:8986:a3bd with SMTP id qp30-20020a05620a389e00b007658986a3bdmr9145403qkn.69.1692702239370; Tue, 22 Aug 2023 04:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692702239; cv=none; d=google.com; s=arc-20160816; b=tl1RsdtgpdpxNexqTIJYvbZjSVa1HS/KC4nwAIPERAS2E7uMgt2be4XvVxSTOaGyy8 HBQYdtt77oPzxtLZI8uPNF+bGxFEqkULzhAuKERy8Kh0ofrWzaYUcgiZZUtViS8VL1pM ZTMQvCSOk/KnVK/6R4HkaWGPviyiVV9r4Hj+rbTiF0Q2/tOl5A2xKQZen/Iz4xTWfcTR YmNVsqHscNkAPRKAFERTVTpIeKt6f7JPW5VHorSlp2ggq3pE000jcQmnUWD0aF6Iuqgs 2M4yIUzoRLyPQbdyC5s0SemK7NexD6RQ+fCpAbIriU9DM+d5YraYzOZJFe10TKlF7ol9 1yGQ== 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=94KriI0niEOcMbu2tDSQW96357N95QTAdPKbo4MTmaA=; fh=nNMMnsLJfx+wwcL6Hpjyue2kO7c5wJkFUZ+p5f7qT8I=; b=EqX8gGKKOewnNLZXNSa54dstJSbxyh1PXnSomyB2AMv7lZ8oMfjtx0Mis0Rrj0ga2m ebViOPuqsy8vEHQ/2cEeEHH1DqJfF7VP9mDGRVxCe2xY4BRDjcgEFbxtdkAegVF3PCGU yOUgHFF0iWuWyZ75GjtG+ceIftqWV7MX1PDOaNhQS8QKyl3rPRNQud6DGyV3nsFuPj3/ CxQjoSQxNJffucdHptH/kziAdnoUQDSoBzFh9qyDPeCB4xB5kp7bgsOa+8wT3opOURAb dhxnjGftwxVeOcs3ZS39rVXKCOGjkYJQaH1Rw4+bc2TnRsny1pjT1u3H5/Dq1KyeWdiO ZFWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5S5A+es; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id az36-20020a05620a172400b0076da008f6ccsi3787514qkb.288.2023.08.22.04.03.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2023 04:03:59 -0700 (PDT) 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=h5S5A+es; 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 1qYP9h-0006Qq-LG; Tue, 22 Aug 2023 07:02:37 -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 1qYP9K-0006JP-Nl for qemu-devel@nongnu.org; Tue, 22 Aug 2023 07:02:14 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYP9H-0003Mk-Rj for qemu-devel@nongnu.org; Tue, 22 Aug 2023 07:02:14 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3159d5e409dso3399304f8f.0 for ; Tue, 22 Aug 2023 04:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692702130; x=1693306930; 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=94KriI0niEOcMbu2tDSQW96357N95QTAdPKbo4MTmaA=; b=h5S5A+es7DmCFoaLeGCa4PV1hyy6CUGtK9Xg2SIyzmZ0nOuJevfPSqlAeH2GZxlGSX ZvSQxnBRlqDg1ss35urod3/mnBenDmUpCEivWCjecuN7Jn242BU7RSY5H7rg6NPJm0Gw XNHbprDZfJJoa3DfZ0PQ17XYek3G754uFrJh84vCKayE8hJMYRsfzV/0NGwNGdGhu4/z P8+aKHSwoWw9AxWc5elzjIznaBtNFYYKqUdE8ZkABBTZUpJsMdyPoXivqY09ShDnJcBs 79/KJYQ9dIQR7sIeEQ1KzK2bj4TI6Yr63dS0i3ONUNhoYCuYkS20OtFSbNe6rMTsgd+M t0VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692702130; x=1693306930; 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=94KriI0niEOcMbu2tDSQW96357N95QTAdPKbo4MTmaA=; b=aGaze1R+HlNe4dHakMWZIXZSsNKK9Dl2pGySkQpoIkyQnD20XPwnIgfoH8m6qYELTO TYGn3L51FV2URD2LaUYcj5oRt+RBmKCJff329LsCpDrlRYhjmFXbkNSQALyqSwkyIuKv zGBn/jWD21buZ2waMllHOHXxCvgQJIXpyk+9orpRIa9fW/H3uU9Z0JOORL6xgPPRs0m2 WkRpEll/bdqKifMNE3tzapVwOFsqW66geiaEZ5YgLAOO0yycTcHiRQ5T1EvD76utH2E1 bh+SgZOFjWnGb/l0NK258KGNy5a+nb9qIPARSxhXuW7p2vfrq/iJ8hYExp3Uqcu13hsX lNyQ== X-Gm-Message-State: AOJu0Yy02GcCEHVSpRJgNVXZPfjoqhHE9Eu/FBAOd8YUvO3PkP+3991u xyd4BDLf84ghfXujCktQ/S2UEyGsVL/2RcVRD8nPNg== X-Received: by 2002:a5d:470f:0:b0:317:dcdd:3fa1 with SMTP id y15-20020a5d470f000000b00317dcdd3fa1mr6545955wrq.34.1692702129860; Tue, 22 Aug 2023 04:02:09 -0700 (PDT) Received: from localhost.localdomain ([37.19.214.4]) by smtp.gmail.com with ESMTPSA id f8-20020adfdb48000000b0031934b035d2sm15656693wrj.52.2023.08.22.04.02.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 22 Aug 2023 04:02:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Xiaojuan Yang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Rikalo , Yoshinori Sato , "Edgar E. Iglesias" , qemu-arm@nongnu.org, Peter Maydell , Jiaxun Yang , Song Gao Subject: [PATCH 5/6] target/mips: Use hswap_i64() in DSHD opcode Date: Tue, 22 Aug 2023 13:01:28 +0200 Message-ID: <20230822110129.41022-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230822110129.41022-1-philmd@linaro.org> References: <20230822110129.41022-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Commit 46be8425ff ("tcg: Implement tcg_gen_{h,w}swap_{i32,i64}") introduced the generic hswap_i32(). Use it instead of open-coding it in gen_bshfl(). Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/translate.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 9bb40f1849..4f34ea9b6a 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -4948,19 +4948,7 @@ static void gen_bshfl(DisasContext *ctx, uint32_t op2, int rt, int rd) } break; case OPC_DSHD: - { - TCGv t1 = tcg_temp_new(); - TCGv t2 = tcg_constant_tl(0x0000FFFF0000FFFFULL); - - tcg_gen_shri_tl(t1, t0, 16); - tcg_gen_and_tl(t1, t1, t2); - tcg_gen_and_tl(t0, t0, t2); - tcg_gen_shli_tl(t0, t0, 16); - tcg_gen_or_tl(t0, t0, t1); - tcg_gen_shri_tl(t1, t0, 32); - tcg_gen_shli_tl(t0, t0, 32); - tcg_gen_or_tl(cpu_gpr[rd], t0, t1); - } + tcg_gen_hswap_i64(cpu_gpr[rd], t0); break; #endif default: