]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.asm
ArmPkg/Library/CompilerIntrinsicsLib: Enable VS2017/ARM builds
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / uldiv.asm
index 6b6184ebd3fc60411b04845ebfbf61874ef23233..aedaac8c6c7f293b2ceb05cd70ec18216b81f9bb 100644 (file)
@@ -1,6 +1,7 @@
 //------------------------------------------------------------------------------\r
 //\r
 // Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+// Copyright (c) 2018, Pete Batard. 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
 //------------------------------------------------------------------------------\r
 \r
 \r
+    EXPORT  __aeabi_uldivmod\r
+    EXPORT  __rt_udiv64\r
 \r
+    AREA  s___aeabi_uldivmod, CODE, READONLY, ARM\r
 \r
-    INCLUDE AsmMacroExport.inc\r
+    ARM\r
+\r
+;\r
+;UINT64\r
+;EFIAPI\r
+;__rt_udiv64 (\r
+;  IN  UINT64   Divisor\r
+;  IN  UINT64   Dividend\r
+;  )\r
+;\r
+__rt_udiv64\r
+  ; Swap r0-r1 and r2-r3\r
+  mov     r12, r0\r
+  mov     r0, r2\r
+  mov     r2, r12\r
+  mov     r12, r1\r
+  mov     r1, r3\r
+  mov     r3, r12\r
+  b       __aeabi_uldivmod\r
 \r
 ;\r
 ;UINT64\r
@@ -25,7 +47,7 @@
 ;  IN  UINT64   Divisor\r
 ;  )\r
 ;\r
- RVCT_ASM_EXPORT __aeabi_uldivmod\r
+__aeabi_uldivmod\r
   stmdb   sp!, {r4, r5, r6, lr}\r
   mov     r4, r1\r
   mov     r5, r0\r
@@ -261,7 +283,6 @@ _ll_div0
   b       __aeabi_ldiv0\r
 \r
 __aeabi_ldiv0\r
-  BX        r14\r
+  bx        r14\r
 \r
   END\r
-\r