From patchwork Wed May 26 23:46:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 448235 Delivered-To: patch@linaro.org Received: by 2002:a17:907:2b0d:0:0:0:0 with SMTP id gc13csp6044478ejc; Wed, 26 May 2021 16:49:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6AJ4G4KSd50KMxIVXQhEUMP+iFtitktLjdPay1iAYmm6KqRB+m3Yx392+DXijgDrlbMme X-Received: by 2002:a25:f50b:: with SMTP id a11mr776799ybe.181.1622072994703; Wed, 26 May 2021 16:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622072994; cv=none; d=google.com; s=arc-20160816; b=gtMeNWbHd6llBbP2udVAuTbCwBh479cHE1ih9k7SK79lQc95eWiUhUQoWhimd7Vuh2 xHr/to3oy/CL1P2e+IfQucFF/JioVSII9Oh2cnBkw/gMv/UDGWzu7NnA2+mnbl37h9Mh 5al2OsaFmJQ97eeMjkB4xGis95JtH1Xhbsd+EW7opsrPsoDz5ucRo0a73aPVI6ggp3yK SPRSEvkFmZXDgNjnlLA639Xnul0Ye7Dk7EsnGxscXXi8KRXZs8OoVSVWkkSv9RMx0Vsw zh6dP6l+WpfqtT5TZFrzEWrY6MgObCMcdiJYHiY0jFtonY3ErUYWoD/iT4o9KW16b3Mx xH5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=AL54ucl9rKZtOi9n7cxYrp3sXcKmYEJsp/xosYfzNek=; b=XRmcfz39sRof/rZOLhz1zuaW+FEjYlw08QR1HjmLG/MOfZz1asgnfbEl32RO2UJGLD eS+ZJApKk38uLo5vpO7YTfhEszsxSkypKusn3JgxqRpgD/BE7cakbSUqHlcf2VHC3Tie 811NTmk7Us/K2VvXkemPqqTmB+8ueIuwPA6v37sxUAudAxzfuRgDdGl+2ZFcQvJC2l8C mzj9RevS3WVXhPV2ayoUF/E1T0/YS/9MyKUtDXN64ORRb10gSgJixvGWYeiiQFSmjJTx VdixdW+/UJDbObCc4HUy7V0W5mB+Z/H12zNQkPG73tv6+hgLafn0R6q6F2Xrncomgb7h jPxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tsmhNVVT; 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 t13si552893ybu.481.2021.05.26.16.49.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 May 2021 16:49:54 -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=tsmhNVVT; 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]:60600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm3Hd-0000m1-VP for patch@linaro.org; Wed, 26 May 2021 19:49:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm3FH-0005bh-VC for qemu-devel@nongnu.org; Wed, 26 May 2021 19:47:27 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:33701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm3F7-0004Rt-26 for qemu-devel@nongnu.org; Wed, 26 May 2021 19:47:27 -0400 Received: by mail-pg1-x536.google.com with SMTP id i5so2333356pgm.0 for ; Wed, 26 May 2021 16:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AL54ucl9rKZtOi9n7cxYrp3sXcKmYEJsp/xosYfzNek=; b=tsmhNVVT5upgP/qFpjXyY6gr7iumkFodLHoPiL/isYWN++DI90zo4FNYaSRe1hx7IL n9PnE4xKKrQ6Rw+B/YKi5f8VwCizwGf4tXeLaJ8Anz24/jkrlzwTrVSIh4/cfw3ptbAe sdzDOEwl5drqxjKhpcSYF58nuPgxnwe/d+k5Lg6GlQ7i9/+CAH/bQV4Q1+b31tz4K15k td9/GHR0wBji+/uJ8MHrRv2RXkj8evddZLgskUKfOTpoWFXQQzenDt//MGsmPOfsUaLa bPq3d6lMfN49/e9GueljGrcdY0NV+jqNE2V9yqXi5k4efPtA9XyEU4MG9N6FcTt/BdZN i6sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AL54ucl9rKZtOi9n7cxYrp3sXcKmYEJsp/xosYfzNek=; b=kr4Cr0h5xFeGEArNvdrSkxtfv1aP6nNn/YH+hERoNXo4su0B6AfHjhaO7JftnFcNUd vPAfglRKD5z3GSYpfh4zKQEx07mbD58l2roD2R1/9ZNXVWcdk2YKGdl2qNHxRIXu+ZqX Xx+tLy3lmjIfBwaq9jDgiublcK+l0QZPb3m6RBvlMyOuRECifg15AgujhvqC8OoPjgwz VMcwgJ3nAE4WWSLvmKnQSrXHT0BwWcuNWjc18PeW9n0TbHUkICC3BbiitRPlSx7bQneZ 4g+RnhAJPLxPSkPj5mVIQDekkUHgDaTKoUA7EHO7HN3kBjYp2lbE+KankG+6aHsGLwzz OKyQ== X-Gm-Message-State: AOAM531l/lq73ZEch5rv0RazdauykUVMUwG91mQxILY3/HGjF+SxdpVO wW3t+ikW4Isgj9Q425YvP26h/Ehog5GcLw== X-Received: by 2002:a63:1054:: with SMTP id 20mr1020907pgq.120.1622072835113; Wed, 26 May 2021 16:47:15 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id g13sm285355pfi.18.2021.05.26.16.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 16:47:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 02/31] exec/memory_ldst_phys: Sort declarations Date: Wed, 26 May 2021 16:46:41 -0700 Message-Id: <20210526234710.125396-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210526234710.125396-1-richard.henderson@linaro.org> References: <20210526234710.125396-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.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=unavailable 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: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé To ease the file review, sort the declarations by the size of the access (8, 16, 32). Simple code movement, no logical change. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210518183655.1711377-3-philmd@redhat.com> Signed-off-by: Richard Henderson --- include/exec/memory_ldst_phys.h.inc | 78 ++++++++++++++--------------- 1 file changed, 39 insertions(+), 39 deletions(-) -- 2.25.1 diff --git a/include/exec/memory_ldst_phys.h.inc b/include/exec/memory_ldst_phys.h.inc index b9dd53c389..4033795add 100644 --- a/include/exec/memory_ldst_phys.h.inc +++ b/include/exec/memory_ldst_phys.h.inc @@ -20,6 +20,12 @@ */ #ifdef TARGET_ENDIANNESS +static inline uint32_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr) +{ + return glue(address_space_lduw, SUFFIX)(ARG1, addr, + MEMTXATTRS_UNSPECIFIED, NULL); +} + static inline uint32_t glue(ldl_phys, SUFFIX)(ARG1_DECL, hwaddr addr) { return glue(address_space_ldl, SUFFIX)(ARG1, addr, @@ -32,10 +38,10 @@ static inline uint64_t glue(ldq_phys, SUFFIX)(ARG1_DECL, hwaddr addr) MEMTXATTRS_UNSPECIFIED, NULL); } -static inline uint32_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr) +static inline void glue(stw_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) { - return glue(address_space_lduw, SUFFIX)(ARG1, addr, - MEMTXATTRS_UNSPECIFIED, NULL); + glue(address_space_stw, SUFFIX)(ARG1, addr, val, + MEMTXATTRS_UNSPECIFIED, NULL); } static inline void glue(stl_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) @@ -44,18 +50,30 @@ static inline void glue(stl_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) MEMTXATTRS_UNSPECIFIED, NULL); } -static inline void glue(stw_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) -{ - glue(address_space_stw, SUFFIX)(ARG1, addr, val, - MEMTXATTRS_UNSPECIFIED, NULL); -} - static inline void glue(stq_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val) { glue(address_space_stq, SUFFIX)(ARG1, addr, val, MEMTXATTRS_UNSPECIFIED, NULL); } #else +static inline uint32_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr) +{ + return glue(address_space_ldub, SUFFIX)(ARG1, addr, + MEMTXATTRS_UNSPECIFIED, NULL); +} + +static inline uint32_t glue(lduw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr) +{ + return glue(address_space_lduw_le, SUFFIX)(ARG1, addr, + MEMTXATTRS_UNSPECIFIED, NULL); +} + +static inline uint32_t glue(lduw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr) +{ + return glue(address_space_lduw_be, SUFFIX)(ARG1, addr, + MEMTXATTRS_UNSPECIFIED, NULL); +} + static inline uint32_t glue(ldl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr) { return glue(address_space_ldl_le, SUFFIX)(ARG1, addr, @@ -80,36 +98,6 @@ static inline uint64_t glue(ldq_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr) MEMTXATTRS_UNSPECIFIED, NULL); } -static inline uint32_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr) -{ - return glue(address_space_ldub, SUFFIX)(ARG1, addr, - MEMTXATTRS_UNSPECIFIED, NULL); -} - -static inline uint32_t glue(lduw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr) -{ - return glue(address_space_lduw_le, SUFFIX)(ARG1, addr, - MEMTXATTRS_UNSPECIFIED, NULL); -} - -static inline uint32_t glue(lduw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr) -{ - return glue(address_space_lduw_be, SUFFIX)(ARG1, addr, - MEMTXATTRS_UNSPECIFIED, NULL); -} - -static inline void glue(stl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) -{ - glue(address_space_stl_le, SUFFIX)(ARG1, addr, val, - MEMTXATTRS_UNSPECIFIED, NULL); -} - -static inline void glue(stl_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) -{ - glue(address_space_stl_be, SUFFIX)(ARG1, addr, val, - MEMTXATTRS_UNSPECIFIED, NULL); -} - static inline void glue(stb_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) { glue(address_space_stb, SUFFIX)(ARG1, addr, val, @@ -128,6 +116,18 @@ static inline void glue(stw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t va MEMTXATTRS_UNSPECIFIED, NULL); } +static inline void glue(stl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) +{ + glue(address_space_stl_le, SUFFIX)(ARG1, addr, val, + MEMTXATTRS_UNSPECIFIED, NULL); +} + +static inline void glue(stl_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) +{ + glue(address_space_stl_be, SUFFIX)(ARG1, addr, val, + MEMTXATTRS_UNSPECIFIED, NULL); +} + static inline void glue(stq_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val) { glue(address_space_stq_le, SUFFIX)(ARG1, addr, val,