From patchwork Tue May 16 19:40:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 682431 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp21495wrt; Tue, 16 May 2023 13:00:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7A6YNibH54Pv53akRGAOWXvsdQvSrISxcB3lxCE2+E5uhnhk8nIJmb3+KTFCKAXeHCKgRK X-Received: by 2002:adf:fe45:0:b0:307:cf55:a7d8 with SMTP id m5-20020adffe45000000b00307cf55a7d8mr14808141wrs.42.1684267234324; Tue, 16 May 2023 13:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684267234; cv=none; d=google.com; s=arc-20160816; b=fPVVDaNNp1wYdhA7TSP1n8eDBmNuB5Fww+QHDA55X6ydDDSNqcaUuMN5ms0tC0ksax WaNlOAzdhICxokLU3/A4z+EZE5AvpVJubkrhPxpTlBonFVlMm4ogCqs8bRRggaAdOOL4 J8mRMoBILPudN/Mr1ktrHG7oE41t/9i+eNEOVptlNejBTZCWrl7rXHJKjJRmhH1c8CSM J+BGhLk6/jELo7WNxH1HUgePnivjn7QsIqZab7OVfdg6PGzzDnFjNW2pUHTi6gfwFMx7 23pfWQ+8ZnJxF8GjCYhDtQX/qv0tOSC78DqpoJ/r9czlvhM0MC+d3MQhZxys+nusC5nn BuzA== 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=5+dVuSBLTF8ePfEeAWZlWoNLu6H+GdqE/W0YcabdOx4=; b=Tk9GBoR/sf6WxmJqxcYOgViE+mve+uX7SQ7DKXLDCl4STnUl0cB4LKThg6MpjjCVoi kwWgj9wPcMoiP9igkuLVxlJey+oXkhdyfwUhyQwA7o8FmauWRWgJC7+MmN8cAVdCmi+h RnRrle8jx46sFOj4LW2yqEyQTBAcE2RELE4U9cpsv8NCdvC+oaVNuIym/UtJRRgru5Lh fuye1k6vIloPrOgMSvHLhfrq2vgL67URiHikH3yfDqDyWf+qdGBQMrL7Z7Hf1McqRL+g 4Ne+UGi1F1gYRVCT9aHi2l37TxBqQCK3tQoeHsMfiq1yA2HPJecAUL/Ixz12Wih8cv92 i7Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a1bs5mhY; 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 x4-20020a5d54c4000000b003062e049da5si160961wrv.825.2023.05.16.13.00.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2023 13:00:34 -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=a1bs5mhY; 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 1pz0Yn-0006je-KH; Tue, 16 May 2023 15:42:13 -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 1pz0Ym-0006j5-Lj for qemu-devel@nongnu.org; Tue, 16 May 2023 15:42:12 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pz0Yl-0002jW-5O for qemu-devel@nongnu.org; Tue, 16 May 2023 15:42:12 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-643a6f993a7so9345452b3a.1 for ; Tue, 16 May 2023 12:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684266130; x=1686858130; 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=5+dVuSBLTF8ePfEeAWZlWoNLu6H+GdqE/W0YcabdOx4=; b=a1bs5mhY0ROnk5///ulxqVXpro91VUTPz/6pBcL4Geuf4cjiJrBHDv3PyUfuzGcCWU SyvZDJ1EGhiVWYfc5WuvpPLw2Z+NKQyl0Mr/sv/MBr9x8FBexTqcr+Kz/BmNn54esiZN yDjTLsx3SG1AEvcFTqNifja3bskPV/wzbL1dosVK36DJDRmfTBMvgXgucGflG2yLe4Mp hODzD0r51r9VRT8XXTm2YWf1i0KuRR1r/t1eE/saHO5xbfFIMsWiQvNY9Cbr5CA3c1ZO 69m2YtsGew5qHSmHW4wVHOVoP6Nu0u85cltAGCmVEQ/nd5lZE7LyKwy90jW6IcL22ePf ibjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684266130; x=1686858130; 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=5+dVuSBLTF8ePfEeAWZlWoNLu6H+GdqE/W0YcabdOx4=; b=YOrPV9rjvLLsCnZ3/oBmiPd8EQpiIzgK5sRDdlDDojaHskpuWDjDaeXVuZARxfVoR3 zdnAuWO3abbOFsjW/UoCVzgQO7Klpb5HuKD/8vZpnk1iH0vEjQD4E0/69KPD8AXubd4y /1IWWJozGkZQmHZbNVcn7Bq39BGxbMV0WkK1Cv+NFoixoIvzezy0Xpmw1uRhx86mZYoR +/isJwHDKfhAJ6hyHAPETr1Os8t9UMAFx9FEFbKxQrYEZvxQKrIoJwFcvptLV0qkFNnC PuEQLwMLibIUEv4DpKNAGNefOaVDKQNJHY/5G6UehN6L1DUvLJ0nWUH4NK+2FZIKndsv IEuw== X-Gm-Message-State: AC+VfDzRgMo2ms8y839T35G6PKfCI6xuAIuvxytHeWBFhcr16SNpstqQ YOVLrCoP2DeH+Tra/+IPUSzancEb6cGBOC4112M= X-Received: by 2002:a05:6a00:10d2:b0:643:96bc:b292 with SMTP id d18-20020a056a0010d200b0064396bcb292mr41983348pfu.5.1684266130414; Tue, 16 May 2023 12:42:10 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:ec81:440e:33a4:40b9]) by smtp.gmail.com with ESMTPSA id z21-20020aa791d5000000b006260526cf0csm13771165pfa.116.2023.05.16.12.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 12:42:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 26/80] tcg/sparc64: Split out tcg_out_movi_s32 Date: Tue, 16 May 2023 12:40:51 -0700 Message-Id: <20230516194145.1749305-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230516194145.1749305-1-richard.henderson@linaro.org> References: <20230516194145.1749305-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target.c.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tcg/sparc64/tcg-target.c.inc b/tcg/sparc64/tcg-target.c.inc index e244209890..4375a06377 100644 --- a/tcg/sparc64/tcg-target.c.inc +++ b/tcg/sparc64/tcg-target.c.inc @@ -405,6 +405,13 @@ static void tcg_out_movi_s13(TCGContext *s, TCGReg ret, int32_t arg) tcg_out_arithi(s, ret, TCG_REG_G0, arg, ARITH_OR); } +/* A 32-bit constant sign-extended to 64 bits. */ +static void tcg_out_movi_s32(TCGContext *s, TCGReg ret, int32_t arg) +{ + tcg_out_sethi(s, ret, ~arg); + tcg_out_arithi(s, ret, ret, (arg & 0x3ff) | -0x400, ARITH_XOR); +} + /* A 32-bit constant zero-extended to 64 bits. */ static void tcg_out_movi_u32(TCGContext *s, TCGReg ret, uint32_t arg) { @@ -444,8 +451,7 @@ static void tcg_out_movi_int(TCGContext *s, TCGType type, TCGReg ret, /* A 32-bit constant sign-extended to 64-bits. */ if (arg == lo) { - tcg_out_sethi(s, ret, ~arg); - tcg_out_arithi(s, ret, ret, (arg & 0x3ff) | -0x400, ARITH_XOR); + tcg_out_movi_s32(s, ret, arg); return; }