From: "Pete Batard" <pete@akeo.ie>
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 [thread overview]
Message-ID: <20190513085416.1352-4-pete@akeo.ie> (raw)
In-Reply-To: <20190513085416.1352-1-pete@akeo.ie>
The new source is a port of the RVCT version.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Pete Batard <pete@akeo.ie>
---
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.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#------------------------------------------------------------------------------
+
+#include <AsmMacroIoLib.h>
+
+#
+#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
next prev parent reply other threads:[~2019-05-13 8:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-13 8:54 [PATCH v2 0/4] ArmPkg/CompilerIntrinsicsLib: Update MSFT, GCC intrinsics Pete Batard
2019-05-13 8:54 ` [PATCH v2 1/4] ArmPkg/CompilerIntrinsicsLib: Remove unused sources and clean up .inf Pete Batard
2019-05-13 8:54 ` [PATCH v2 2/4] ArmPkg/CompilerIntrinsicsLib: Add memcmp, memmove intrinsics for MSFT Pete Batard
2019-05-13 8:54 ` Pete Batard [this message]
2019-05-13 8:54 ` [PATCH v2 4/4] ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources Pete Batard
2019-05-13 15:56 ` [PATCH v2 0/4] ArmPkg/CompilerIntrinsicsLib: Update MSFT, GCC intrinsics Leif Lindholm
2019-05-13 16:29 ` [edk2-devel] " Pete Batard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190513085416.1352-4-pete@akeo.ie \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox