From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=tgNEBMak; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.208.48, mailfrom: pete@akeo.ie) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by groups.io with SMTP; Tue, 07 May 2019 08:57:40 -0700 Received: by mail-ed1-f48.google.com with SMTP id w11so19221552edl.5 for ; Tue, 07 May 2019 08:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ks0CwtbQvrBQX4n1eUYZiJiO9M1fiVI/D484hHifdF4=; b=tgNEBMakK1jHVpxZeeOvaTSv2Dm0hCIVSszF+EM2x2gn+GtZz+U+zyBuyO+t/Ld5eX z39sqje2YYU2E6Sk5faRy15jJrTOJzSf/4T+C6oWltwfKN/qj0pRvibC2i9KicX6N0Xt yQDYARU5ozRokx2ofDPrJ0Bbxf33eb1OmtHiSk/1ltSpcVh0FPvIg2vt4v6qgEabX+vK Uk3djNKpwsL1rkmOvNLNFq59k/BsYGhri0oPuKAMbqZawV5uftYLIxWQQtOqiZ14+MWT qzLCeuQoSvxAJ/Ql3DdGN8vPO2Bh0iFoEdi4mdUm6pAdEeqlB/np/lKkcaAfUTV2sOoK yCEg== 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:mime-version :content-transfer-encoding; bh=ks0CwtbQvrBQX4n1eUYZiJiO9M1fiVI/D484hHifdF4=; b=Hw6softevm58igpjtpVwmyPiQolMKPmluOowDegqMRUBaUMFCiVKHjN8fPg6E9b1+z MLxOG8iK/2T7wtF1MEsMTXT86vPNCaQ22TaelPm4BaMrJsDaVvptSG3Mt+yZ0THv/PkQ zIuQFIQKgmZGMNMOmQh7qw/kgsPKmV79gvz3BMhnglX1gI08CTjxQowth9d2bZoS1m2K K6TtQj1VF3nFm/mgrBlx7cn4WMIUa1SrcsYQC98ivzni6sSbH5AI4LbPp/4RAmQFfvEG ctc2YyFBg5AGfNxA2hXSGOZspMuH6shvavujEgwNuSJXpJ+LNjGdpyjvfLWWLeix1Rra QF0g== X-Gm-Message-State: APjAAAWV9uT6jPH5+pRG/5smi0SMuOSVdYOh1/iAm22EocGD0Bafdu6g X83LYnpvO3/7RBwNhmovcBLnjH6SrqE= X-Google-Smtp-Source: APXvYqw+Ea3EuzHE+jbpPACXmqkhC92xORpk1Cm4ja3j5jgaioKIOcDniPdf1bdcZnasawQg5FVoFg== X-Received: by 2002:a17:906:a3da:: with SMTP id ca26mr4070730ejb.237.1557244657991; Tue, 07 May 2019 08:57:37 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.71.1]) by smtp.gmail.com with ESMTPSA id i16sm2222517ejh.79.2019.05.07.08.57.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 08:57:36 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org Subject: [PATCH 1/1] ArmPkg/CompilerIntrinsicsLib: Add lasr assembly source for gcc/arm Date: Tue, 7 May 2019 16:57:26 +0100 Message-Id: <20190507155726.1132-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit While compiling drivers or applications on Debian 9.8, using the native gcc 6.3.0 ARM compiler, one may run into the following build failure: "undefined reference to `__aeabi_lasr'" This patch adds the missing definition, through a port of the existing RVCT lasr.asm source. CC: Ard Biesheuvel CC: Leif Lindholm Signed-off-by: Pete Batard --- ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S | 22 ++++++++++++++++++++ ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf | 1 + 2 files changed, 23 insertions(+) diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S new file mode 100644 index 000000000000..9ded045b8bc4 --- /dev/null +++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S @@ -0,0 +1,22 @@ +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#------------------------------------------------------------------------------ + +#include + +ASM_FUNC(__aeabi_lasr) + subs r3,r2,#0x20 + bpl L_Test + rsb r3,r2,#0x20 + lsr r0,r0,r2 + orr r0,r0,r1,LSL r3 + asr r1,r1,r2 + bx lr +L_Test: + asr r0,r1,r3 + asr r1,r1,#31 + bx lr diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf index 0d5634959993..7cb8f194f210 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +++ b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf @@ -90,6 +90,7 @@ [Sources.ARM] Arm/uldiv.S | GCC Arm/ldivmod.S | GCC + Arm/lasr.S | GCC Arm/llsr.S | GCC Arm/llsl.S | GCC -- 2.21.0.windows.1