Rename uallshr_asm.s -> aullshr_asm.s.
Remove unneeded .data sections from some files
Declare allshr, aullshr, fltused.
Should fix linux problems build too.
Modified: trunk/reactos/lib/rtl/i386/alldiv_asm.s
Modified: trunk/reactos/lib/rtl/i386/alldvrm_asm.s
Modified: trunk/reactos/lib/rtl/i386/allmul_asm.s
Modified: trunk/reactos/lib/rtl/i386/allrem_asm.s
Modified: trunk/reactos/lib/rtl/i386/allshl_asm.s
Modified: trunk/reactos/lib/rtl/i386/allshr_asm.s
Modified: trunk/reactos/lib/rtl/i386/atan_asm.s
Modified: trunk/reactos/lib/rtl/i386/aulldvrm_asm.s
Modified: trunk/reactos/lib/rtl/i386/aullrem_asm.s
Added: trunk/reactos/lib/rtl/i386/aullshr_asm.s
Modified: trunk/reactos/lib/rtl/i386/ceil_asm.s
Modified: trunk/reactos/lib/rtl/i386/cos_asm.s
Modified: trunk/reactos/lib/rtl/i386/fabs_asm.s
Modified: trunk/reactos/lib/rtl/i386/floor_asm.s
Modified: trunk/reactos/lib/rtl/i386/ftol_asm.s
Modified: trunk/reactos/lib/rtl/i386/log_asm.s
Modified: trunk/reactos/lib/rtl/i386/pow_asm.s
Modified: trunk/reactos/lib/rtl/i386/sin_asm.s
Modified: trunk/reactos/lib/rtl/i386/sqrt_asm.s
Modified: trunk/reactos/lib/rtl/i386/tan_asm.s
Deleted: trunk/reactos/lib/rtl/i386/uallshr_asm.s
Modified: trunk/reactos/lib/rtl/rtl.xml
_____
Modified: trunk/reactos/lib/rtl/i386/alldiv_asm.s
--- trunk/reactos/lib/rtl/i386/alldiv_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/alldiv_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -2,7 +2,7 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Run-Time Library
- * FILE: lib/rtl/i386/math.S
+ * FILE: lib/rtl/i386/alldiv_asm.S
* PROGRAMER: Alex Ionescu (alex(a)relsoft.net)
* Eric Kohl (ekohl(a)rz-online.de)
*
@@ -36,13 +36,10 @@
*/
.globl __alldiv
+ .globl __fltused
/* DATA
********************************************************************/
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
__fltused:
.long 0x9875
_____
Modified: trunk/reactos/lib/rtl/i386/alldvrm_asm.s
--- trunk/reactos/lib/rtl/i386/alldvrm_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/alldvrm_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl __alldvrm
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/allmul_asm.s
--- trunk/reactos/lib/rtl/i386/allmul_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/allmul_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -36,16 +36,7 @@
*/
.globl __allmul
-
- /* DATA
********************************************************************/
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/allrem_asm.s
--- trunk/reactos/lib/rtl/i386/allrem_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/allrem_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl __allrem
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/allshl_asm.s
--- trunk/reactos/lib/rtl/i386/allshl_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/allshl_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -36,16 +36,7 @@
*/
.globl __allshl
-
- /* DATA
********************************************************************/
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/allshr_asm.s
--- trunk/reactos/lib/rtl/i386/allshr_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/allshr_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -2,7 +2,7 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Run-Time Library
- * FILE: lib/rtl/i386/aulldiv.S
+ * FILE: lib/rtl/i386/allshr.S
* PROGRAMER: Alex Ionescu (alex(a)relsoft.net)
* Eric Kohl (ekohl(a)rz-online.de)
*
@@ -35,155 +35,62 @@
* SUCH DAMAGE.
*/
-.globl __aulldiv
+.globl __allshr
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
//
-// ulldiv - unsigned long divide
+// llshr - long shift right
//
// Purpose:
-// Does a unsigned long divide of the arguments. Arguments are
-// not changed.
+// Does a signed Long Shift Right
+// Shifts a long right any number of bits.
//
// Entry:
-// Arguments are passed on the stack:
-// 1st pushed: divisor (QWORD)
-// 2nd pushed: dividend (QWORD)
+// EDX:EAX - long value to be shifted
+// CL - number of bits to shift by
//
// Exit:
-// EDX:EAX contains the quotient (dividend/divisor)
-// NOTE: this routine removes the parameters from the stack.
+// EDX:EAX - shifted value
//
// Uses:
-// ECX
+// CL is destroyed.
//
-__aulldiv:
+__allshr:
- push ebx
- push esi
-
-// Set up the local stack and save the index registers. When this is
done
-// the stack frame will look as follows (assuming that the expression
a/b will
-// generate a call to uldiv(a, b)):
//
-// -----------------
-// | |
-// |---------------|
-// | |
-// |--divisor (b)--|
-// | |
-// |---------------|
-// | |
-// |--dividend (a)-|
-// | |
-// |---------------|
-// | return addr** |
-// |---------------|
-// | EBX |
-// |---------------|
-// ESP---->| ESI |
-// -----------------
+// Handle shifts of 64 bits or more (if shifting 64 bits or more, the
result
+// depends only on the high order bit of edx).
//
+ cmp cl,64
+ jae short .RETSIGN
-#undef DVNDLO
-#undef DVNDHI
-#undef DVSRLO
-#undef DVSRHI
-#define DVNDLO [esp + 12] // stack address of dividend (a)
-#define DVNDHI [esp + 16] // stack address of dividend (a)
-#define DVSRLO [esp + 20] // stack address of divisor (b)
-#define DVSRHI [esp + 24] // stack address of divisor (b)
-
//
-// Now do the divide. First look to see if the divisor is less than
4194304K.
-// If so, then we can use a simple algorithm with word divides,
otherwise
-// things get a little more complex.
+// Handle shifts of between 0 and 31 bits
//
+ cmp cl, 32
+ jae short .MORE32
+ shrd eax,edx,cl
+ sar edx,cl
+ ret
- mov eax,DVSRHI // check to see if divisor < 4194304K
- or eax,eax
- jnz short ..L1 // nope, gotta do this the hard way
- mov ecx,DVSRLO // load divisor
- mov eax,DVNDHI // load high word of dividend
- xor edx,edx
- div ecx // get high order bits of quotient
- mov ebx,eax // save high bits of quotient
- mov eax,DVNDLO // edx:eax <- remainder:lo word of dividend
- div ecx // get low order bits of quotient
- mov edx,ebx // edx:eax <- quotient hi:quotient lo
- jmp short ..L2 // restore stack and return
-
//
-// Here we do it the hard way. Remember, eax contains DVSRHI
+// Handle shifts of between 32 and 63 bits
//
+.MORE32:
+ mov eax,edx
+ sar edx,31
+ and cl,31
+ sar eax,cl
+ ret
-..L1:
- mov ecx,eax // ecx:ebx <- divisor
- mov ebx,DVSRLO
- mov edx,DVNDHI // edx:eax <- dividend
- mov eax,DVNDLO
-..L3:
- shr ecx,1 // shift divisor right one bit// hi bit
<- 0
- rcr ebx,1
- shr edx,1 // shift dividend right one bit// hi
bit <- 0
- rcr eax,1
- or ecx,ecx
- jnz short ..L3 // loop until divisor < 4194304K
- div ebx // now divide, ignore remainder
- mov esi,eax // save quotient
-
//
-// We may be off by one, so to check, we will multiply the quotient
-// by the divisor and check the result against the orignal dividend
-// Note that we must also check for overflow, which can occur if the
-// dividend is close to 2**64 and the quotient is off by 1.
+// Return double precision 0 or -1, depending on the sign of edx
//
-
- mul dword ptr DVSRHI // QUOT * DVSRHI
- mov ecx,eax
- mov eax,DVSRLO
- mul esi // QUOT * DVSRLO
- add edx,ecx // EDX:EAX = QUOT * DVSR
- jc short ..L4 // carry means Quotient is off by 1
-
-//
-// do long compare here between original dividend and the result of the
-// multiply in edx:eax. If original is larger or equal, we are ok,
otherwise
-// subtract one (1) from the quotient.
-//
-
- cmp edx,DVNDHI // compare hi words of result and original
- ja short ..L4 // if result > original, do subtract
- jb short ..L5 // if result < original, we are ok
- cmp eax,DVNDLO // hi words are equal, compare lo words
- jbe short ..L5 // if less or equal we are ok, else
subtract
-..L4:
- dec esi // subtract 1 from quotient
-..L5:
- xor edx,edx // edx:eax <- quotient
- mov eax,esi
-
-//
-// Just the cleanup left to do. edx:eax contains the quotient.
-// Restore the saved registers and return.
-//
-
-..L2:
-
- pop esi
- pop ebx
-
- ret 16
+.RETSIGN:
+ sar edx,31
+ mov eax,edx
+ ret
_____
Modified: trunk/reactos/lib/rtl/i386/atan_asm.s
--- trunk/reactos/lib/rtl/i386/atan_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/atan_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl _atan
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/aulldvrm_asm.s
--- trunk/reactos/lib/rtl/i386/aulldvrm_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/aulldvrm_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl __aulldvrm
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/aullrem_asm.s
--- trunk/reactos/lib/rtl/i386/aullrem_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/aullrem_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl __aullrem
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Added: trunk/reactos/lib/rtl/i386/aullshr_asm.s
--- trunk/reactos/lib/rtl/i386/aullshr_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/aullshr_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -0,0 +1,96 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Run-Time Library
+ * FILE: lib/rtl/i386/uallshr.S
+ * PROGRAMER: Alex Ionescu (alex(a)relsoft.net)
+ * Eric Kohl (ekohl(a)rz-online.de)
+ *
+ * Copyright (C) 2002 Michael Ringgaard.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
the
+ * documentation and/or other materials provided with the
distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this
software
+ * without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS
+ * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS
INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF
+ * SUCH DAMAGE.
+ */
+
+.globl __aullshr
+
+.intel_syntax noprefix
+
+/* FUNCTIONS
***************************************************************/
+
+//
+// ullshr - long shift right
+//
+// Purpose:
+// Does a unsigned Long Shift Right
+// Shifts a long right any number of bits.
+//
+// Entry:
+// EDX:EAX - long value to be shifted
+// CL - number of bits to shift by
+//
+// Exit:
+// EDX:EAX - shifted value
+//
+// Uses:
+// CL is destroyed.
+//
+
+__aullshr:
+
+//
+// Handle shifts of 64 bits or more (if shifting 64 bits or more, the
result
+// depends only on the high order bit of edx).
+//
+ cmp cl,64
+ jae short ..RETZERO
+
+//
+// Handle shifts of between 0 and 31 bits
+//
+ cmp cl, 32
+ jae short ..MORE32
+ shrd eax,edx,cl
+ shr edx,cl
+ ret
+
+//
+// Handle shifts of between 32 and 63 bits
+//
+..MORE32:
+ mov eax,edx
+ xor edx,edx
+ and cl,31
+ shr eax,cl
+ ret
+
+//
+// return 0 in edx:eax
+//
+..RETZERO:
+ xor eax,eax
+ xor edx,edx
+ ret
_____
Modified: trunk/reactos/lib/rtl/i386/ceil_asm.s
--- trunk/reactos/lib/rtl/i386/ceil_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/ceil_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -36,16 +36,7 @@
*/
.globl _ceil
-
- /* DATA
********************************************************************/
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/cos_asm.s
--- trunk/reactos/lib/rtl/i386/cos_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/cos_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -36,16 +36,7 @@
*/
.globl _cos
-
- /* DATA
********************************************************************/
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/fabs_asm.s
--- trunk/reactos/lib/rtl/i386/fabs_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/fabs_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl _fabs
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/floor_asm.s
--- trunk/reactos/lib/rtl/i386/floor_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/floor_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl _floor
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/ftol_asm.s
--- trunk/reactos/lib/rtl/i386/ftol_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/ftol_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl __ftol
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/log_asm.s
--- trunk/reactos/lib/rtl/i386/log_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/log_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl _log
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/pow_asm.s
--- trunk/reactos/lib/rtl/i386/pow_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/pow_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -43,9 +43,6 @@
.long 0 // Floating point zero
.long 0 // Floating point zero
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/sin_asm.s
--- trunk/reactos/lib/rtl/i386/sin_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/sin_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -36,16 +36,7 @@
*/
.globl _sin
-
- /* DATA
********************************************************************/
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/sqrt_asm.s
--- trunk/reactos/lib/rtl/i386/sqrt_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/sqrt_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl _sqrt
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Modified: trunk/reactos/lib/rtl/i386/tan_asm.s
--- trunk/reactos/lib/rtl/i386/tan_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/tan_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -37,15 +37,6 @@
.globl _tan
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
.intel_syntax noprefix
/* FUNCTIONS
***************************************************************/
_____
Deleted: trunk/reactos/lib/rtl/i386/uallshr_asm.s
--- trunk/reactos/lib/rtl/i386/uallshr_asm.s 2005-12-06 09:29:43 UTC
(rev 19928)
+++ trunk/reactos/lib/rtl/i386/uallshr_asm.s 2005-12-06 13:12:22 UTC
(rev 19929)
@@ -1,105 +0,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * PURPOSE: Run-Time Library
- * FILE: lib/rtl/i386/ullshr.S
- * PROGRAMER: Alex Ionescu (alex(a)relsoft.net)
- * Eric Kohl (ekohl(a)rz-online.de)
- *
- * Copyright (C) 2002 Michael Ringgaard.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
the
- * documentation and/or other materials provided with the
distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this
software
- * without specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS
- * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS
INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF
- * SUCH DAMAGE.
- */
-
-.globl __ullshr
-
- /* DATA
********************************************************************/
-
-fzero:
- .long 0 // Floating point zero
- .long 0 // Floating point zero
-
-__fltused:
- .long 0x9875
-
-.intel_syntax noprefix
-
-/* FUNCTIONS
***************************************************************/
-
-//
-// ullshr - long shift right
-//
-// Purpose:
-// Does a unsigned Long Shift Right
-// Shifts a long right any number of bits.
-//
-// Entry:
-// EDX:EAX - long value to be shifted
-// CL - number of bits to shift by
-//
-// Exit:
-// EDX:EAX - shifted value
-//
-// Uses:
-// CL is destroyed.
-//
-
-__aullshr:
-
-//
-// Handle shifts of 64 bits or more (if shifting 64 bits or more, the
result
-// depends only on the high order bit of edx).
-//
- cmp cl,64
- jae short ..RETZERO
-
-//
-// Handle shifts of between 0 and 31 bits
-//
- cmp cl, 32
- jae short ..MORE32
- shrd eax,edx,cl
- shr edx,cl
- ret
-
-//
-// Handle shifts of between 32 and 63 bits
-//
-..MORE32:
- mov eax,edx
- xor edx,edx
- and cl,31
- shr eax,cl
- ret
-
-//
-// return 0 in edx:eax
-//
-..RETZERO:
- xor eax,eax
- xor edx,edx
- ret
_____
Modified: trunk/reactos/lib/rtl/rtl.xml
--- trunk/reactos/lib/rtl/rtl.xml 2005-12-06 09:29:43 UTC (rev
19928)
+++ trunk/reactos/lib/rtl/rtl.xml 2005-12-06 13:12:22 UTC (rev
19929)
@@ -17,6 +17,7 @@
<file>atan_asm.s</file>
<file>aulldvrm_asm.s</file>
<file>aullrem_asm.s</file>
+ <file>aullshr_asm.s</file>
<file>ceil_asm.s</file>
<file>chkstk_asm.s</file>
<file>comparememory_asm.s</file>
@@ -36,8 +37,7 @@
<file>prefetchmemory_asm.s</file>
<file>sin_asm.s</file>
<file>sqrt_asm.s</file>
- <file>tan_asm.s</file>
- <file>uallshr_asm.s</file>
+ <file>tan_asm.s</file>
<file>zeromemory_asm.s</file>
</directory>
</if>