From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3B86C433F5 for ; Sun, 3 Oct 2021 19:33:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2880F615A4 for ; Sun, 3 Oct 2021 19:33:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2880F615A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:47022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX7ES-0003ML-4g for qemu-devel@archiver.kernel.org; Sun, 03 Oct 2021 15:33:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX7CH-000239-Ce for qemu-devel@nongnu.org; Sun, 03 Oct 2021 15:30:53 -0400 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:34430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX7CF-0006Yv-Ue for qemu-devel@nongnu.org; Sun, 03 Oct 2021 15:30:53 -0400 Received: by mail-qt1-x836.google.com with SMTP id m26so14112302qtn.1 for ; Sun, 03 Oct 2021 12:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/lXaW0GH1qPPHTl3d97F7oIcDJ2wQnADO69Tpait7lc=; b=WdMHWK3SA3/biGYYpm2ypbmma/iQxZ4SYobQhQlTrbqvyiDcqtrsBRmwER53kuPhw+ R8VLHPMQBZgU6/he3chfp63hSL9ZPXXwYKSQo29vXUkZZ0hoDGnjxDXY3DewUr7eYsPg 9JDBXZbeSvAgpBNhAUhv980JAJvgoFyWAFvEu0NBwEHrKaTCnK0yu9m/TFsQU0AlDd35 x6b2VoqhbKAGsx1vQRUi6TSibNa0lMNkAZ59ZF3AQKzbJOY1EdigYtjMXgfvkCCeCYOD UkVsK/6eThHR05xDV+dfi4ujsurTnbxF+kuD95aLcCuaKfmlwNr4/8wuZ9HxeTzmajMp 3deg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/lXaW0GH1qPPHTl3d97F7oIcDJ2wQnADO69Tpait7lc=; b=oMQ4BGKvnnZvTym4DDXQ4GGjDmqTDb/GQVEuU8OYejqiEC9Z2sXRibZDbQe6jY0frp okw5FxhXyojueSJSM7Xaz984bDOGfPITo+vRgVs/bYTHyt+vYzQNtmj+JiUjoOgtUxYS NET7GM9ohiPkqE63FCeWAMikTRfNFutEi//2YUY7uxC1b9lfQMzZJa59qXy6o3fkw+lm DQBUKUFpu+PfR2MBeNnodfYsTm4KNIzjLG09u6ito/tmVnSMyUnagrLsDfSQd5osrjkC b6Oc8dG2VrtEgXPt2aUDxH5L3TKVCPPdkwD9xFkLyD75p39DOxgzaGRxxlGB9wFUDz7b fESg== X-Gm-Message-State: AOAM531IsDFdZcGnPxXP+i2nGx/WdiOezaSk92KBIqc3t0GifBo8vf9e JOOoUeVLRYDo+YavdzxFxI2K+A== X-Google-Smtp-Source: ABdhPJxSFpfHXysyJeASjkU7/DlNFiUAPcnYJVJ7yIM2QqQw+zRfDuJIyK63tEDr+grOj8N9TLBG4w== X-Received: by 2002:ac8:7d4b:: with SMTP id h11mr9906166qtb.333.1633289450571; Sun, 03 Oct 2021 12:30:50 -0700 (PDT) Received: from [192.168.3.43] (c-67-174-166-185.hsd1.ga.comcast.net. [67.174.166.185]) by smtp.gmail.com with ESMTPSA id o13sm8150239qtk.37.2021.10.03.12.30.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Oct 2021 12:30:50 -0700 (PDT) Subject: Re: [PATCH 5/8] target/mips: Use tcg_constant_i32() in gen_msa_3rf() To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org References: <20211003175743.3738710-1-f4bug@amsat.org> <20211003175743.3738710-6-f4bug@amsat.org> From: Richard Henderson Message-ID: <5ffb23ad-2a66-c9e6-12a6-a35e5c669652@linaro.org> Date: Sun, 3 Oct 2021 15:30:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211003175743.3738710-6-f4bug@amsat.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x836.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, NICE_REPLY_A=-0.001, 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: , Cc: Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 10/3/21 1:57 PM, Philippe Mathieu-Daudé wrote: > /* adjust df value for floating-point instruction */ > - tcg_gen_movi_i32(tdf, df + 2); > + switch (MASK_MSA_3RF(ctx->opcode)) { > + case OPC_MUL_Q_df: > + case OPC_MADD_Q_df: > + case OPC_MSUB_Q_df: > + case OPC_MULR_Q_df: > + case OPC_MADDR_Q_df: > + case OPC_MSUBR_Q_df: > + tdf = tcg_constant_i32(df + 1); > + break; > + default: > + tdf = tcg_constant_i32(df + 2); > + break; > + } Is a second switch really worth it, maintenance wise? It doesn't hurt to put an unused constant into the pool... But it looks ok, Reviewed-by: Richard Henderson r~