Zebediah Figura : ntdll: Implement _alldvrm() and _aulldvrm().

Alexandre Julliard julliard at winehq.org
Tue Jun 26 04:44:27 CDT 2018


Module: wine
Branch: stable
Commit: 0cedcf481e165e555ec177469c41af56fabf2974
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0cedcf481e165e555ec177469c41af56fabf2974

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Apr  3 10:10:27 2018 -0500

ntdll: Implement _alldvrm() and _aulldvrm().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit f80b1f45ff31c8a4f079bdda85c44a64b6d667fe)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/ntdll/large_int.c              | 74 +++++++++++++++++++++++++++++++++++++
 dlls/ntdll/ntdll.spec               |  4 +-
 dlls/ntoskrnl.exe/ntoskrnl.exe.spec |  4 +-
 3 files changed, 78 insertions(+), 4 deletions(-)

diff --git a/dlls/ntdll/large_int.c b/dlls/ntdll/large_int.c
index a0d465c..5716416 100644
--- a/dlls/ntdll/large_int.c
+++ b/dlls/ntdll/large_int.c
@@ -627,6 +627,43 @@ LONGLONG WINAPI _allshr( LONGLONG a, LONG b )
 }
 
 /******************************************************************************
+ *        _alldvrm   (NTDLL.@)
+ *
+ * Divide two 64 bit integers.
+ *
+ * PARAMS
+ *  a [I] Initial number.
+ *  b [I] Number to divide a by.
+ *
+ * RETURNS
+ *  Returns the quotient of a and b in edx:eax.
+ *  Returns the remainder of a and b in ebx:ecx.
+ */
+__ASM_STDCALL_FUNC( _alldvrm, 16,
+                    "pushl %ebp\n\t"
+                    __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
+                    __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
+                    "movl %esp,%ebp\n\t"
+                    __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
+                    "pushl 20(%ebp)\n\t"
+                    "pushl 16(%ebp)\n\t"
+                    "pushl 12(%ebp)\n\t"
+                    "pushl 8(%ebp)\n\t"
+                    "call " __ASM_NAME("_allrem") "\n\t"
+                    "movl %edx,%ebx\n\t"
+                    "pushl %eax\n\t"
+                    "pushl 20(%ebp)\n\t"
+                    "pushl 16(%ebp)\n\t"
+                    "pushl 12(%ebp)\n\t"
+                    "pushl 8(%ebp)\n\t"
+                    "call " __ASM_NAME("_alldiv") "\n\t"
+                    "popl %ecx\n\t"
+                    "leave\n\t"
+                    __ASM_CFI(".cfi_def_cfa %esp,4\n\t")
+                    __ASM_CFI(".cfi_same_value %ebp\n\t")
+                    "ret $16" )
+
+/******************************************************************************
  *        _aullrem   (NTDLL.@)
  *
  * Calculate the remainder after dividing two 64 bit unsigned integers.
@@ -660,4 +697,41 @@ ULONGLONG WINAPI _aullshr( ULONGLONG a, LONG b )
     return a >> b;
 }
 
+/******************************************************************************
+ *        _aulldvrm   (NTDLL.@)
+ *
+ * Divide two 64 bit unsigned integers.
+ *
+ * PARAMS
+ *  a [I] Initial number.
+ *  b [I] Number to divide a by.
+ *
+ * RETURNS
+ *  Returns the quotient of a and b in edx:eax.
+ *  Returns the remainder of a and b in ebx:ecx.
+ */
+__ASM_STDCALL_FUNC( _aulldvrm, 16,
+                    "pushl %ebp\n\t"
+                    __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
+                    __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
+                    "movl %esp,%ebp\n\t"
+                    __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
+                    "pushl 20(%ebp)\n\t"
+                    "pushl 16(%ebp)\n\t"
+                    "pushl 12(%ebp)\n\t"
+                    "pushl 8(%ebp)\n\t"
+                    "call " __ASM_NAME("_aullrem") "\n\t"
+                    "movl %edx,%ebx\n\t"
+                    "pushl %eax\n\t"
+                    "pushl 20(%ebp)\n\t"
+                    "pushl 16(%ebp)\n\t"
+                    "pushl 12(%ebp)\n\t"
+                    "pushl 8(%ebp)\n\t"
+                    "call " __ASM_NAME("_aulldiv") "\n\t"
+                    "popl %ecx\n\t"
+                    "leave\n\t"
+                    __ASM_CFI(".cfi_def_cfa %esp,4\n\t")
+                    __ASM_CFI(".cfi_same_value %ebp\n\t")
+                    "ret $16" )
+
 #endif  /* __i386__ */
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index a6d6dc8..a9a9e3f 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1336,7 +1336,7 @@
 @ cdecl -private __iscsymf(long) NTDLL___iscsymf
 @ cdecl -private __toascii(long) NTDLL___toascii
 @ stdcall -arch=i386 -ret64 _alldiv(int64 int64)
-# @ stub _alldvrm
+@ stdcall -arch=i386 -norelay _alldvrm(int64 int64)
 @ stdcall -arch=i386 -ret64 _allmul(int64 int64)
 @ stdcall -arch=i386 -norelay _alloca_probe()
 @ stdcall -arch=i386 -ret64 _allrem(int64 int64)
@@ -1344,7 +1344,7 @@
 @ stdcall -arch=i386 -ret64 _allshr(int64 long)
 @ cdecl -private -ret64 _atoi64(str)
 @ stdcall -arch=i386 -ret64 _aulldiv(int64 int64)
-# @ stub _aulldvrm
+@ stdcall -arch=i386 -norelay _aulldvrm(int64 int64)
 @ stdcall -arch=i386 -ret64 _aullrem(int64 int64)
 @ stdcall -arch=i386 -ret64 _aullshr(int64 long)
 @ stdcall -private -arch=i386 -norelay _chkstk()
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 0e4af90..9031f09 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -1403,14 +1403,14 @@
 @ cdecl -private -arch=i386 _CIsqrt() msvcrt._CIsqrt
 @ cdecl -private _abnormal_termination() msvcrt._abnormal_termination
 @ stdcall -private -arch=i386 -ret64 _alldiv(int64 int64)
-@ stub _alldvrm
+@ stdcall -private -arch=i386 -norelay _alldvrm(int64 int64)
 @ stdcall -private -arch=i386 -ret64 _allmul(int64 int64)
 @ stdcall -private -arch=i386 -norelay _alloca_probe()
 @ stdcall -private -arch=i386 -ret64 _allrem(int64 int64)
 @ stdcall -private -arch=i386 -ret64 _allshl(int64 long)
 @ stdcall -private -arch=i386 -ret64 _allshr(int64 long)
 @ stdcall -private -arch=i386 -ret64 _aulldiv(int64 int64)
-@ stub _aulldvrm
+@ stdcall -private -arch=i386 -norelay _aulldvrm(int64 int64)
 @ stdcall -private -arch=i386 -ret64 _aullrem(int64 int64)
 @ stdcall -private -arch=i386 -ret64 _aullshr(int64 long)
 @ stdcall -private -arch=i386 -norelay _chkstk()




More information about the wine-cvs mailing list