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=YKonN5Uq; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.208.68, mailfrom: pete@akeo.ie) Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by groups.io with SMTP; Mon, 13 May 2019 01:54:35 -0700 Received: by mail-ed1-f68.google.com with SMTP id n17so16463794edb.0 for ; Mon, 13 May 2019 01:54:34 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=UB69TUtHILn5kXCGMlNY4JEgCG3RFckAP+RAuolyHYw=; b=YKonN5UqbOHd2MGJcidzxuRrmBF4GlIYBQPx1BC/YB0vCNxPTnLwWcOAURCVvMTKnd X7DkMXlp4lH7cgZbgPufLWjUWJBsm5QcwedjOWRvGvgXaT5g+6rkBPza6jkcCiPv6V82 y0/0VvHIuk2Je40tDYwzocmPz3+uYVdGu2Aqq9+nhsRONrZyHjyb3+VDTabEL4fC/bZa qZZaRBCRo/PV8Nm8vCcAkxXB8MOo82TYKivUup3kNFfU68s9Q4tlgRjInjdivt1hwhdN rAoS1tSGtuz/ntWRG7cFiyNlV/aBbBC8RRywjbH9WoE3AHno/nTW/KH5FC9uNfhALeD0 kFoQ== 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=UB69TUtHILn5kXCGMlNY4JEgCG3RFckAP+RAuolyHYw=; b=ouKrT6bryXajH9MUkEaqoschc5h+h+tNeN1kfLY5NQE5d83g4duSfSifdBwx5N9dxG WLxcnwqTJhIzzCnlFMwWzwdYK2OZX4++bUofvofHFLGsoJqwhimawEtIosJs3RKESHu0 GIL90EuaPK/c9DQ09NbPJeeYddi6Il3b850QL3xof02XJKd69uc+RfvlWSJkdAp+f37s m1pUNfrzpr4qlIpLIz6wdivfdEN8pgKpTloK2+bdTl34Z0IG4YVA7sNmXBUgSEMl3uOz e513mE8P6OwxezupsDdsD7XlObRqephjXDJlyAfdsB3CNhourtS1khr/XnHMZnZrDJPF h1QQ== X-Gm-Message-State: APjAAAVasIwWVKlhh3Do5N9tdYLR9zU4JxV3bCqbJVs+uwnjhwy4x+bu ORd/+9NbIQvVK/WvF8uoOUwcEUhJA2M= X-Google-Smtp-Source: APXvYqzRpiI00m1J7LvB4PnJA6cp9nXqvg+CcC1f3RD1EWOTzHKdakoTmZeTb1S4vRlVCHKljezeVA== X-Received: by 2002:a50:aed0:: with SMTP id f16mr20831399edd.12.1557737673274; Mon, 13 May 2019 01:54:33 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.49.55]) by smtp.gmail.com with ESMTPSA id k57sm3595701ede.17.2019.05.13.01.54.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 01:54:32 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org Subject: [PATCH v2 3/4] ArmPkg/CompilerIntrinsicsLib: Add lasr ARM assembly source for GCC Date: Mon, 13 May 2019 09:54:15 +0100 Message-Id: <20190513085416.1352-4-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190513085416.1352-1-pete@akeo.ie> References: <20190513085416.1352-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The new source is a port of the RVCT version. Cc: Ard Biesheuvel Cc: Leif Lindholm Signed-off-by: Pete Batard --- ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S | 30 ++++++++++++++++++++ ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf | 1 + 2 files changed, 31 insertions(+) diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S new file mode 100644 index 000000000000..feeea9edd12a --- /dev/null +++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S @@ -0,0 +1,30 @@ +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#------------------------------------------------------------------------------ + +#include + +# +#UINT64 +#EFIAPI +#__aeabi_lasr ( +# IN UINT64 Value +# IN UINT32 Shift +# ); +# +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 d6cc63db75c7..aaf3de02a952 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +++ b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf @@ -68,6 +68,7 @@ [Sources.ARM] Arm/sourcery.S | GCC 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