From patchwork Sat Oct 5 15:25:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 832977 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp1256196wra; Sat, 5 Oct 2024 08:28:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGZ9ARi2URAjJdR9kAWv1TanoLbJfjzrvizlyXlk5chgJhL4yzvCKLKLP4VTXtECgJgAMHew==@linaro.org X-Google-Smtp-Source: AGHT+IH1WevLPVfrAhQoB/ZzytLnMNjm3TCO9UWbMK7k/IDWzuqLPJGTtsxlhI80MJ0DR4hQNs6p X-Received: by 2002:a05:620a:4588:b0:7ae:4b83:daf2 with SMTP id af79cd13be357-7ae6f493bd8mr1021771285a.61.1728142124194; Sat, 05 Oct 2024 08:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728142124; cv=none; d=google.com; s=arc-20240605; b=PrG87Y9ru6XGx0Y7oPwg20TA4i4p+8Ubwq3tEBiDvPitTQpBgrRdoZMVPAshUr34u8 2ZksFMVCdsUXaHNUNcY8u4WsNKXXztv2z/jIP5Sxjly5+iPrR20pUeJPthXgK9gJJYmy Q41EltFl1uwqmDxeEA1krApC+oQeVwYNoR4CPl9hh1q5bg/Z6x42f3eOXRRoBKNWj/nQ lCDLg3tf8+iYmk1cZPxqMhKcgzjQ+71Z/zbw9R3/sFvjj/IaxYBd6Sp2scchNEcOvg3o IIWe/I70HglJzCoyaVEjmquRzczry1JwS60NvwdG/xwZDPkZPADBDNOWcxrVDOHgRsAu VcgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=js9k8IR/cEhAqGc5dKpCioG/n/UgV+piB56d5dg8Aiw=; fh=rQg8EQ8KH04w/0VkDYF6/ktgEyHJ2dqn1eatHCfBaLw=; b=bVaxvNzbcDDr4752czaBC9oehSEAUoGbkCzHT8s9m1eLhTl/y+8wMnx+0Auy9OMffi re/VXNCDDlr1DNC+m11SxHHsnXt5IsT4FBzIGITJ0ZIZFOLpnJLOm3rDfKxLmrxqE3cR w6RDXaAQPmHPsDpGgxmQfDHWjlMI8T71J6pFs5kuV34j3KlXPV/bpAa8sApk3NknTYxY kOahM45ASBEuS8utLOVC0u6DdMac584SqcKd1apDhADYJkT49byBlaxcfUhcaUr53M7i 818XxkomazNtk/eH9ZdD5v6A3bxo+uftFGj5lCVWKTyCy+QOqfE2JoUYfYH9EjuhF+s2 7zyA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UBDojHq+; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7ae756628f1si201628385a.270.2024.10.05.08.28.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2024 08:28:44 -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=UBDojHq+; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sx6fS-0001zz-Op; Sat, 05 Oct 2024 11:26:03 -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 1sx6fO-0001xd-OZ for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:25:58 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sx6fN-0002Ki-40 for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:25:58 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-20b9b35c7c3so32438885ad.3 for ; Sat, 05 Oct 2024 08:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728141956; x=1728746756; darn=nongnu.org; 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=js9k8IR/cEhAqGc5dKpCioG/n/UgV+piB56d5dg8Aiw=; b=UBDojHq+IY6hLn2Pm+jokXV1Vb/qHm2LRTVrgvpvQX78JPyAnXm2dcGbffMht2WRLp vwNZwf7SMtJxxDwr4h9oIIqgHHMTL5xF6bRHzg8iAgrdHD5iU9fc9IXLtOMPcgOkYPq7 iHrbX+vflVajChWvcO2EkWphPMo84H1VONdNpl9/iDRQear4HoyMytycZ0Onc8uPOq3G M4zniZeE72I9IV/DrWBdS3bWXsZoTK+pwAIeHo0eG1b+DA2NCtlLCfmUPh3JEV8A47PS rnPaaHWWzlEzEywsthBqUZ7HET4z4D+GYL9tHQV+khOLumsRpxoM/PYQbUZyzygtZ7ws HyJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728141956; x=1728746756; 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=js9k8IR/cEhAqGc5dKpCioG/n/UgV+piB56d5dg8Aiw=; b=KoH9FL6+R+QW0NlY4XZ9xOqKDtxS4RqqTQJpGPt3aJDCO+7TtmyqKfjg+XaM3d3s37 awrw9EYfq+bJ5hYYMfCYnDCTvlhuf29B6IFVUnzmFunDKmCcJUOuDwSemc8/Nbd64TN2 brePe2v9W2GmGBYadTwzJgFqSLIZ+duweL0gPkwxptkouuNLsKOe1+OvtFALCo4S7Kmw po9oaV9CbGA2AEIZBpDT0Joq1x+0FhAKhg3C7lQjfnYCz5HGYlED/xbwxmiHLHDYMrt1 wSgbylBg3hbf1HxMnyTiGnr6DtvgXHovNon7PjOrujZBMoFmPI9x2B9Hu4+/u3myxVml J8eQ== X-Gm-Message-State: AOJu0YxQ0NFY+s+CL4+RLcnvw2514wNNQXGxcM6ZF6ywIrtynZrGMwpO if6FdDGkpXqupEDltngRAuAVzhnmMMzI616X4X+WJ5BgsT6F3Fi+7esjH0/LnIQEmoI5vnUkxcj x X-Received: by 2002:a17:902:e551:b0:20b:4875:2c51 with SMTP id d9443c01a7336-20bfe024d5cmr107983235ad.27.1728141955681; Sat, 05 Oct 2024 08:25:55 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c1396948dsm14351765ad.225.2024.10.05.08.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 08:25:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@kernel.org, peter.maydell@linaro.org, alex.bennee@linaro.org, linux-parisc@vger.kernel.org, qemu-arm@nongnu.org Subject: [PATCH 03/20] include/exec/memop: Move get_alignment_bits from tcg.h Date: Sat, 5 Oct 2024 08:25:34 -0700 Message-ID: <20241005152551.307923-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241005152551.307923-1-richard.henderson@linaro.org> References: <20241005152551.307923-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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 This function is specific to MemOp, not TCG in general. Signed-off-by: Richard Henderson --- include/exec/memop.h | 23 +++++++++++++++++++++++ include/tcg/tcg.h | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/exec/memop.h b/include/exec/memop.h index f881fe7af4..97720a8ee7 100644 --- a/include/exec/memop.h +++ b/include/exec/memop.h @@ -170,4 +170,27 @@ static inline bool memop_big_endian(MemOp op) return (op & MO_BSWAP) == MO_BE; } +/** + * get_alignment_bits + * @memop: MemOp value + * + * Extract the alignment size from the memop. + */ +static inline unsigned get_alignment_bits(MemOp memop) +{ + unsigned a = memop & MO_AMASK; + + if (a == MO_UNALN) { + /* No alignment required. */ + a = 0; + } else if (a == MO_ALIGN) { + /* A natural alignment requirement. */ + a = memop & MO_SIZE; + } else { + /* A specific alignment requirement. */ + a = a >> MO_ASHIFT; + } + return a; +} + #endif diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 21d5884741..824fb3560d 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -281,29 +281,6 @@ static inline int tcg_type_size(TCGType t) return 4 << i; } -/** - * get_alignment_bits - * @memop: MemOp value - * - * Extract the alignment size from the memop. - */ -static inline unsigned get_alignment_bits(MemOp memop) -{ - unsigned a = memop & MO_AMASK; - - if (a == MO_UNALN) { - /* No alignment required. */ - a = 0; - } else if (a == MO_ALIGN) { - /* A natural alignment requirement. */ - a = memop & MO_SIZE; - } else { - /* A specific alignment requirement. */ - a = a >> MO_ASHIFT; - } - return a; -} - typedef tcg_target_ulong TCGArg; /* Define type and accessor macros for TCG variables.