From patchwork Sat May 20 20:55:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784180 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=c1IG32Yz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKlg6X5cz20PS for ; Sun, 21 May 2023 22:34:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 49A94847E3; Sun, 21 May 2023 14:33:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="c1IG32Yz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB51F847B5; Sat, 20 May 2023 22:56:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CD45184707 for ; Sat, 20 May 2023 22:56:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-64d426e63baso1297165b3a.0 for ; Sat, 20 May 2023 13:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616163; x=1687208163; 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=2cRpA8jEpN1qE+cZxGqIfompyMGVIcoXqM7l/Yg/N84=; b=c1IG32YzSFiOYj+kDhbJj7OctdvdFbvVWRmT+X6+iyOk8+dd6esYoyG0re7T/b2O7l QM0xoQXzuyDxcxhEJHCgIEUcoe2f8+tTh4jqCvS2XfYE3hDkD2bDzdeD2JzctZFv001w J36q9G5qlijYQM4ykIbAx+nxEN1vVSd+ylBRZs3Ztnf4gBt/hDy1i48HansfAr4Jv8Ao IA8HOw3pzV3PIJh3KDzY4wGQYrrkDEMjwt2ZXoWeIUiOT88uMaopH6CrFd3XL/u1mnKA YlemHdp/Smv8HeLNajOxIPmtp9qrnAgXsryMlnLeOqyAxJZtzMEmn7SLjDDRsmIwBakE uGfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616163; x=1687208163; 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=2cRpA8jEpN1qE+cZxGqIfompyMGVIcoXqM7l/Yg/N84=; b=EM9uEWNepEWBru4c3DA+09HoLedgUf36bejIj8MSt5CSxkFITjeQj04UwvqWyET+NP 9PnkAkMzsFzbkZr6MXLIiigsim7gLF7s44HLiDRp2rfj8cFKP59M35o35c6ZCA8jNJpP 2BNjBbWb3i7YEKFoZTpgH5Rpeq5nXmIyRfEF2rWy7XRdnhjV0CwI2XQbjqsJE1vqd/NN mI48nWpVGxEhcLNadxp0HTX96Xe34uadmegFO9PAFyry8obasiKsObEsvHqg0/HA7eyN mwOvGWw8PJKXONUVouyKQauLVnHFqfqRZJp9PbPrOJK087kjB+FcOkvqUlUMRAmrHCyY j2cg== X-Gm-Message-State: AC+VfDy82OkYqVwMJFuek5sMTY4TKufASkvX+UtBJxlpTN25nyX00/fN OBhVMzZyQayUnj+eAhyAK2ThJ0cfcmNPqcUw X-Google-Smtp-Source: ACHHUZ5/HMY0XpkgPD+MRwrpqYiwhDAugj7VO2yiaI6IB6sn73Re4Of6yDrjFoOuHlAxzUTgpWu0RQ== X-Received: by 2002:a05:6a20:3c8e:b0:100:a201:83ce with SMTP id b14-20020a056a203c8e00b00100a20183cemr6837831pzj.9.1684616162790; Sat, 20 May 2023 13:56:02 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:02 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Tom Rini Subject: [RFC PATCH 05/10] arm: add aligned-memory aliases to eabi_compat Date: Sat, 20 May 2023 14:55:42 -0600 Message-Id: <20230520205547.1009254-6-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean These are sometimes used by LLVM's code-generator, when it can guarantee that the memory buffer being passed is aligned on a (4- or 8-byte) boundary. They can safely be aliases to the unaligned versions. Signed-off-by: Sam Edwards --- arch/arm/lib/eabi_compat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index 059ca07265..d00f68a3f6 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -31,12 +31,24 @@ void __aeabi_memcpy(void *dest, const void *src, size_t n) (void) memcpy(dest, src, n); } +void __aeabi_memcpy4(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy); + +void __aeabi_memcpy8(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy); + void __aeabi_memset(void *dest, size_t n, int c) { (void) memset(dest, c, n); } +void __aeabi_memset4(void *dest, size_t n, int c) __alias(__aeabi_memset); + +void __aeabi_memset8(void *dest, size_t n, int c) __alias(__aeabi_memset); + void __aeabi_memclr(void *dest, size_t n) { (void)memset(dest, 0, n); } + +void __aeabi_memclr4(void *dest, size_t n) __alias(__aeabi_memclr); + +void __aeabi_memclr8(void *dest, size_t n) __alias(__aeabi_memclr);