]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/CompilerIntrinsicsLib: Add missing __aeabi_llsl and __aeabi_llsr for GCC
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 28 Jan 2013 11:40:04 +0000 (11:40 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 28 Jan 2013 11:40:04 +0000 (11:40 +0000)
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14103 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsl.S [new file with mode: 0644]
ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.S [new file with mode: 0644]
ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf

diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsl.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsl.S
new file mode 100644 (file)
index 0000000..ba8ab1c
--- /dev/null
@@ -0,0 +1,40 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2013, ARM. All rights reserved.<BR>\r
+#\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+.text\r
+.align 2\r
+GCC_ASM_EXPORT(__aeabi_llsl)\r
+\r
+#\r
+#VOID\r
+#EFIAPI\r
+#__aeabi_llsl (\r
+# IN  VOID    *Destination,\r
+# IN  VOID    *Source,\r
+# IN  UINT32  Size\r
+# );\r
+#\r
+ASM_PFX(__aeabi_llsl):\r
+    subs     r3,r2,#0x20\r
+    bpl      1f\r
+    rsb      r3,r2,#0x20\r
+    lsl      r1,r1,r2\r
+    orr      r1,r1,r0,lsr r3\r
+    lsl      r0,r0,r2\r
+    bx       lr\r
+1:\r
+    lsl      r1,r0,r3\r
+    mov      r0,#0\r
+    bx       lr\r
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/llsr.S
new file mode 100644 (file)
index 0000000..3d2c106
--- /dev/null
@@ -0,0 +1,40 @@
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2013, ARM. All rights reserved.<BR>\r
+#\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+.text\r
+.align 2\r
+GCC_ASM_EXPORT(__aeabi_llsr)\r
+\r
+#\r
+#VOID\r
+#EFIAPI\r
+#__aeabi_llsr (\r
+# IN  VOID    *Destination,\r
+# IN  VOID    *Source,\r
+# IN  UINT32  Size\r
+# );\r
+#\r
+ASM_PFX(__aeabi_llsr):\r
+    subs     r3,r2,#0x20\r
+    bpl      1f\r
+    rsb      r3,r2,#0x20\r
+    lsr      r0,r0,r2\r
+    orr      r0,r0,r1,lsl r3\r
+    lsr      r1,r1,r2\r
+    bx       lr\r
+1:\r
+    lsr      r0,r1,r3\r
+    mov      r1,#0\r
+    bx       lr\r
index e6e728af651d50e44991100bf3e53f8dc432ec24..53b1b15c773825f36fdfdb89920f5ad8336713f2 100644 (file)
@@ -2,7 +2,7 @@
 #  Base Library implementation.\r
 #\r
 #  Copyright (c) 2009, Apple Inc. All rights reserved.<BR>\r
-#  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+#  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
   Arm/uldiv.S      | GCC\r
   Arm/ldivmod.S    | GCC\r
 \r
+  Arm/llsr.S       | GCC\r
+  Arm/llsl.S       | GCC\r
+\r
+\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
 \r