From patchwork Wed May 3 07:06:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 678665 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp909210wrs; Wed, 3 May 2023 00:24:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5zcr06302yTnVICZXxlKGAMDxDFYtMUKlspy3zwwC2slmkoLFprE6qA17G8+SxnKvat4S+ X-Received: by 2002:a05:622a:1c3:b0:3ef:6420:6bd1 with SMTP id t3-20020a05622a01c300b003ef64206bd1mr31586325qtw.28.1683098695529; Wed, 03 May 2023 00:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683098695; cv=none; d=google.com; s=arc-20160816; b=miuNbPPQF3W5ihpyFp9La0gn7PSw9b6UgWLVx1kx++aSXVRH7uB76kq3gzMAUiD4mp DF+92TTDKPzmCxwQaeULKQHHI7uCvTyDNij2AYoBMkV2IdRESUGAe0DfP/DbTeyOGVKY 1P1hFHBzUzz8DpOwZ0rXnPDIr/VBVIMyVVSqdBKXVOUOMM/Bx9Q5jfLuvvBLXG6JAfJh QEZZpN+QVwWG+Cjg0yeVsavhivLY6R4AwOXe95LzdG1i/s06aMQ69pwyYp4gxJVT67m8 FpwwaTlw/fPmCoM35Gfoe4GPPzffDV70Y5okcqpPrcpHBlYk1mZrq47e+zfJJGGmS5TS VgBg== 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=6s7rQstWrDxaC1BjVuEYZobw8VSYDLiLkliwIltqh+E=; b=VHorugxvjVw5kGVRWIk5vtVw6fj10aPJFi7AVAYw5h9q/yU/3AryIuEVv0R6FJNCK7 lq1ReoZe3nHoWXUn/VxNxCGo9MIC6YrotzDVMMg7ts1HZLZoEI1xQ4xM4oWlbIW0G+m0 ViWjJVQ+1TG6n5ivvNgj4YQzbGwsEVaknbrCqQf5QxceFSTmy+x0it0hig+8hzIr76Ay 9Qh0ZxlIHgBpeBQFb1+1blt+E2DB8ZE4WtDsu66iI0cVIOd7ru6GTbGVEIftLUYziLVC hdKzClh6UMkhgxFykodGSSdgyc8fr5GnnBLYBf+Z7oxvNVTqvJT/cK1PXde8tcZFaNv/ ldJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQZStCmf; 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 e10-20020a05622a110a00b003eb1461db6dsi18217662qty.518.2023.05.03.00.24.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2023 00:24:55 -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=DQZStCmf; 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 1pu6bj-0004eK-Mn; Wed, 03 May 2023 03:08:59 -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 1pu6ak-0008AP-8c for qemu-devel@nongnu.org; Wed, 03 May 2023 03:07:58 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu6aC-0005p5-Qe for qemu-devel@nongnu.org; Wed, 03 May 2023 03:07:57 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3f199696149so30072215e9.0 for ; Wed, 03 May 2023 00:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683097642; x=1685689642; 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=6s7rQstWrDxaC1BjVuEYZobw8VSYDLiLkliwIltqh+E=; b=DQZStCmfpITqXVoPKKs046wsCDC6HKbvcDtAnqC7TguHvFgGaIT2G/NeXwws19QZLw gKp+COQvhNBrVGbaAUqbiS0yMUNLqXFk2ggkvJQ0b5oySg4ZcV+nI+5hh5Rrn5IapeYV sEJ0d3feP9kFdq3cFTXVJpOpvd8QJ/pwn5aDJhLqaS+ElnFBT/vEmOJd/HY0yd9tJOCA XHhgKMR1DToVJIY2MWvOB5fW1TJCC92FaKjmih0D9PI3b37b+pstBxjc/WCpPVvo5/cB 7C9IrOWeXOQAWPiLNQsNAQqOD3Z94t0hxAA8/GImAQHo/Ho4A8yrx8m8/mrRcBdKSyoz VRvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683097642; x=1685689642; 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=6s7rQstWrDxaC1BjVuEYZobw8VSYDLiLkliwIltqh+E=; b=ZHgnPCVEiK5lt/VExyB1PdNjc1cyGi+zbv6+XJPovGi02W32nSTmuqBz2t4pLsKzsP U210pYD/amv7NDBhGENl5OeX/7DmZg7qoNmi1oJ5Q3KdBowWSzEbbqqPdB9MwMdV7tuG Es59jf7UkKhDOF4xggzQ7iv5KgTcZETRyxKU1REiUo9jQOSbIhokkFgr9LgK24356uIN e74NMXirGww4D7EZZzkwSAGiIG2kK0klRXuq5i82M+dmcDItW9uYADLBiSYojPyoIelQ /6E/Znjf4pIBHui+eQZlxUga/EVvnOuAMubZrM/xct+++Ylqa4va46WjmwXgZzLA9g0h Jvzg== X-Gm-Message-State: AC+VfDzYyo3KaH8scAgWOda/dz08Cu7xPLU1Dp6w02ZoI60m2XJNWCHe 4y/HJCWHyVhuUyiRYwxLTlktBDTyChwMWZqpaHzY+g== X-Received: by 2002:a7b:c388:0:b0:3f1:7bb5:9d71 with SMTP id s8-20020a7bc388000000b003f17bb59d71mr12991250wmj.33.1683097642518; Wed, 03 May 2023 00:07:22 -0700 (PDT) Received: from stoup.Home ([2a02:c7c:74db:8d00:c01d:9d74:b630:9087]) by smtp.gmail.com with ESMTPSA id q3-20020a1cf303000000b003f3157988f8sm921184wmq.26.2023.05.03.00.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:07:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: git@xen0n.name, gaosong@loongson.cn, philmd@linaro.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org Subject: [PATCH v4 33/57] tcg/sparc64: Split out tcg_out_movi_s32 Date: Wed, 3 May 2023 08:06:32 +0100 Message-Id: <20230503070656.1746170-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230503070656.1746170-1-richard.henderson@linaro.org> References: <20230503070656.1746170-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x329.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=unavailable 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 Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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; }