Author: tkreuzer
Date: Fri Nov 19 18:51:50 2010
New Revision: 49640
URL:
http://svn.reactos.org/svn/reactos?rev=49640&view=rev
Log:
[WIN32K]
Convert asm files into new syntax
Modified:
branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib24bpp_hline.s
branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s
branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_hline.s
branches/cmake-bringup/subsystems/win32/win32k/eng/i386/floatobj.S
branches/cmake-bringup/subsystems/win32/win32k/misc/i386/atan2_asm.s
branches/cmake-bringup/subsystems/win32/win32k/misc/i386/ceil_asm.s
branches/cmake-bringup/subsystems/win32/win32k/misc/i386/cos_asm.s
branches/cmake-bringup/subsystems/win32/win32k/misc/i386/floor_asm.s
branches/cmake-bringup/subsystems/win32/win32k/misc/i386/sin_asm.s
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib24bpp_hline.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib24bpp_hline.s [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib24bpp_hline.s [iso-8859-1]
Fri Nov 19 18:51:50 2010
@@ -6,13 +6,12 @@
* PROGRAMMERS: Magnus Olsen
*/
-.globl _DIB_24BPP_HLine
-.intel_syntax noprefix
+#include <asm.inc>
-.def _DIB_24BPP_HLine;
-.scl 2;
-.type 32;
-.endef
+.code
+
+PUBLIC _DIB_24BPP_HLine
+
_DIB_24BPP_HLine:
push edi
push esi
@@ -151,3 +150,5 @@
pop esi
pop edi
ret
+
+END
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s
[iso-8859-1] (original)
+++ branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s
[iso-8859-1] Fri Nov 19 18:51:50 2010
@@ -7,15 +7,16 @@
* Timo Kreuzer (timo.kreuzer(a)reactos.org)
*/
-.intel_syntax noprefix
+#include <asm.inc>
+.code
/*
* BOOLEAN
* _cdecl
* DIB_32BPP_ColorFill(SURFOBJ* pso, RECTL* prcl, ULONG iColor);
*/
-.globl _DIB_32BPP_ColorFill
+PUBLIC _DIB_32BPP_ColorFill
_DIB_32BPP_ColorFill:
push ebp
mov ebp, esp
@@ -27,22 +28,22 @@
mov edx, [ebp+12] /* edx = prcl */
mov ecx, [ebp+8] /* ecx = pso */
- mov ebx, [ecx+0x24] /* ebx = pso->lDelta; */
+ mov ebx, [ecx+36] /* ebx = pso->lDelta; */
mov [esp], ebx /* lDelta = pso->lDelta; */
mov edi, [edx+4] /* edi = prcl->top; */
mov eax, edi /* eax = prcl->top; */
imul eax, ebx /* eax = prcl->top * pso->lDelta; */
- add eax, [ecx+0x20] /* eax += pso->pvScan0; */
+ add eax, [ecx+32] /* eax += pso->pvScan0; */
mov ebx, [edx] /* ebx = prcl->left; */
lea esi, [eax+ebx*4] /* esi = pvLine0 = eax + 4 * prcl->left; */
mov ebx, [edx+8] /* ebx = prcl->right; */
sub ebx, [edx] /* ebx = prcl->right - prcl->left; */
- jbe end /* if (ebx <= 0) goto end; */
+ jbe .end /* if (ebx <= 0) goto end; */
mov edx, [edx+12] /* edx = prcl->bottom; */
sub edx, edi /* edx -= prcl->top; */
- jbe end /* if (eax <= 0) goto end; */
+ jbe .end /* if (eax <= 0) goto end; */
mov eax, [ebp+16] /* eax = iColor; */
cld
@@ -55,7 +56,7 @@
dec edx /* cy--; */
jnz for_loop /* } while (cy > 0); */
-end:
+.end:
mov eax, 1
add esp, 4
pop edi
@@ -63,3 +64,5 @@
pop ebx
pop ebp
ret
+
+END
Modified: branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_hline.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_hline.s [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/dib/i386/dib32bpp_hline.s [iso-8859-1]
Fri Nov 19 18:51:50 2010
@@ -6,13 +6,11 @@
* PROGRAMMERS: Magnus Olsen
*/
-.globl _DIB_32BPP_HLine
-.intel_syntax noprefix
+#include <asm.inc>
-.def _DIB_32BPP_HLine;
-.scl 2;
-.type 32;
-.endef
+.code
+
+PUBLIC _DIB_32BPP_HLine
_DIB_32BPP_HLine:
sub esp, 12 // rember the base is not hex it is dec
@@ -55,3 +53,4 @@
add esp, 12
ret
+END
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/i386/floatobj.S
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/eng/i386/floatobj.S [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/eng/i386/floatobj.S [iso-8859-1] Fri
Nov 19 18:51:50 2010
@@ -6,6 +6,9 @@
* PROGRAMMER: Timo Kreuzer
*/
+#include <asm.inc>
+
+.code
/*******************************************************************************
* IEEE 754-1985 single precision floating point
@@ -72,9 +75,6 @@
* FLOATOBJ_SubLong - wrapper
*/
-.intel_syntax noprefix
-.text
-
#define lMant 0
#define lExp 4
@@ -87,24 +87,24 @@
* FLOATOBJ_SetFloat(IN OUT PFLOATOBJ pf, IN FLOATL f);
*/
_FLOATOBJ_SetFloat@8:
-.global _FLOATOBJ_SetFloat@8
+PUBLIC _FLOATOBJ_SetFloat@8
push ebp
mov ebp, esp
mov ecx, [esp + PARAM2] /* Load the float into ecx */
mov eax, ecx /* Copy float to eax for later */
- test ecx, 0x7f800000 /* Check for zero exponent - 0 or denormal */
+ test ecx, HEX(7f800000) /* Check for zero exponent - 0 or denormal */
jz SetFloat0 /* If it's all zero, ... */
shl ecx, 7 /* Put the bits for the mantissa in place */
cdq /* Fill edx with the sign from the FLOATL in eax */
- and ecx, 0x7fffffff /* Mask out invalid field in the mantissa */
+ and ecx, HEX(7fffffff) /* Mask out invalid field in the mantissa */
shr eax, 23 /* Shift the exponent in eax in place */
- or ecx, 0x40000000 /* Set bit for 1 in the mantissa */
- and eax, 0xff /* Mask out invalid fields in the exponent in eax */
+ or ecx, HEX(40000000) /* Set bit for 1 in the mantissa */
+ and eax, HEX(0ff) /* Mask out invalid fields in the exponent in eax */
xor ecx, edx /* Make use of the sign bit expanded to full edx */
@@ -136,7 +136,7 @@
*
*/
_FLOATOBJ_GetFloat@4:
-.global _FLOATOBJ_GetFloat@4
+PUBLIC _FLOATOBJ_GetFloat@4
push ebp
mov ebp, esp
@@ -152,13 +152,13 @@
sub eax, edx
jz GetFloatRet
- and ecx, 0xff /* Mask out invalid fields in the exponent */
- and eax, 0x3fffffff /* Mask out invalid fields in mantissa */
+ and ecx, HEX(0ff) /* Mask out invalid fields in the exponent */
+ and eax, HEX(3fffffff) /* Mask out invalid fields in mantissa */
shl ecx, 23 /* Shift exponent in place */
shr eax, 7 /* Shift mantissa in place */
- and edx, 0x80000000 /* Reduce edx to sign bit only */
+ and edx, HEX(80000000) /* Reduce edx to sign bit only */
or eax, ecx /* Set exponent in result */
or eax, edx /* Set sign bit in result */
@@ -178,7 +178,7 @@
* Instead of using abs(l), which is 3 + 2 instructions, use a branch.
*/
_FLOATOBJ_SetLong@8:
-.global _FLOATOBJ_SetLong@8
+PUBLIC _FLOATOBJ_SetLong@8
push ebp
mov ebp, esp
@@ -236,7 +236,7 @@
*
*/
_FLOATOBJ_GetLong@4:
-.global _FLOATOBJ_GetLong@4
+PUBLIC _FLOATOBJ_GetLong@4
push ebp
mov ebp, esp
@@ -263,7 +263,7 @@
* FLOATOBJ_Equal(IN PFLOATOBJ pf1, IN PFLOATOBJ pf2);
*/
_FLOATOBJ_Equal@8:
-.global _FLOATOBJ_Equal@8
+PUBLIC _FLOATOBJ_Equal@8
push ebp
mov ebp, esp
@@ -291,7 +291,7 @@
* FLOATOBJ_EqualLong(IN PFLOATOBJ pf, IN LONG l);
*/
_FLOATOBJ_EqualLong@8:
-.global _FLOATOBJ_EqualLong@8
+PUBLIC _FLOATOBJ_EqualLong@8
push ebp
mov ebp, esp
@@ -325,7 +325,7 @@
*
*/
_FLOATOBJ_GreaterThan@8:
-.global _FLOATOBJ_GreaterThan@8
+PUBLIC _FLOATOBJ_GreaterThan@8
push ebp
mov ebp, esp
@@ -415,7 +415,7 @@
* LOATOBJ_GreaterThan
*/
_FLOATOBJ_GreaterThanLong@8:
-.global _FLOATOBJ_GreaterThanLong@8
+PUBLIC _FLOATOBJ_GreaterThanLong@8
push ebp
mov ebp, esp
@@ -445,7 +445,7 @@
*
*/
_FLOATOBJ_LessThan@8:
-.global _FLOATOBJ_LessThan@8
+PUBLIC _FLOATOBJ_LessThan@8
push ebp
mov ebp, esp
@@ -536,7 +536,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetLong and FLOATOBJ_LessThan
*/
_FLOATOBJ_LessThanLong@8:
-.global _FLOATOBJ_LessThanLong@8
+PUBLIC _FLOATOBJ_LessThanLong@8
push ebp
mov ebp, esp
@@ -569,7 +569,7 @@
* No special handling for 0, where mantissa is 0
*/
_FLOATOBJ_Mul@8:
-.global _FLOATOBJ_Mul@8
+PUBLIC _FLOATOBJ_Mul@8
push ebp
mov ebp, esp
@@ -620,7 +620,7 @@
lea edx, [edx + ecx -2] /* Normalize exponent in edx */
- or eax, 0x80000000 /* Set sign bit */
+ or eax, HEX(80000000) /* Set sign bit */
mov ecx, [esp + PARAM1] /* Load pf1 into ecx */
mov [ecx + lMant], eax /* Save back mantissa */
@@ -646,7 +646,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetFloat and FLOATOBJ_Mul
*/
_FLOATOBJ_MulFloat@8:
-.global _FLOATOBJ_MulFloat@8
+PUBLIC _FLOATOBJ_MulFloat@8
push ebp
mov ebp, esp
@@ -675,7 +675,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetLong and FLOATOBJ_Mul
*/
_FLOATOBJ_MulLong@8:
-.global _FLOATOBJ_MulLong@8
+PUBLIC _FLOATOBJ_MulLong@8
push ebp
mov ebp, esp
@@ -703,7 +703,7 @@
*
*/
_FLOATOBJ_Div@8:
-.global _FLOATOBJ_Div@8
+PUBLIC _FLOATOBJ_Div@8
push ebp
mov ebp, esp
push ebx
@@ -736,7 +736,7 @@
div ecx /* Do an unsigned divide */
xor ecx, ecx /* Adjust result */
- test eax, 0x80000000
+ test eax, HEX(80000000)
setnz cl
shr eax, cl
@@ -773,7 +773,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetFloat and FLOATOBJ_Div
*/
_FLOATOBJ_DivFloat@8:
-.global _FLOATOBJ_DivFloat@8
+PUBLIC _FLOATOBJ_DivFloat@8
push ebp
mov ebp, esp
sub esp, 8 /* Make room for a FLOATOBJ on the stack */
@@ -802,7 +802,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetLong and FLOATOBJ_Div
*/
_FLOATOBJ_DivLong@8:
-.global _FLOATOBJ_DivLong@8
+PUBLIC _FLOATOBJ_DivLong@8
push ebp
mov ebp, esp
sub esp, 8 /* Make room for a FLOATOBJ on the stack */
@@ -829,7 +829,7 @@
*
*/
_FLOATOBJ_Add@8:
-.global _FLOATOBJ_Add@8
+PUBLIC _FLOATOBJ_Add@8
push ebp
mov ebp, esp
push ebx
@@ -928,7 +928,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetFloat and FLOATOBJ_Add
*/
_FLOATOBJ_AddFloat@8:
-.global _FLOATOBJ_AddFloat@8
+PUBLIC _FLOATOBJ_AddFloat@8
push ebp
mov ebp, esp
sub esp, 8 /* Make room for a FLOATOBJ on the stack */
@@ -957,7 +957,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetLong and FLOATOBJ_Add
*/
_FLOATOBJ_AddLong@8:
-.global _FLOATOBJ_AddLong@8
+PUBLIC _FLOATOBJ_AddLong@8
push ebp
mov ebp, esp
sub esp, 8 /* Make room for a FLOATOBJ on the stack */
@@ -985,7 +985,7 @@
*
*/
_FLOATOBJ_Sub@8:
-.global _FLOATOBJ_Sub@8
+PUBLIC _FLOATOBJ_Sub@8
push ebp
mov ebp, esp
push ebx
@@ -1083,7 +1083,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetFloat and FLOATOBJ_Sub
*/
_FLOATOBJ_SubFloat@8:
-.global _FLOATOBJ_SubFloat@8
+PUBLIC _FLOATOBJ_SubFloat@8
push ebp
mov ebp, esp
sub esp, 8 /* Make room for a FLOATOBJ on the stack */
@@ -1112,7 +1112,7 @@
* Currently implemented as a wrapper around FLOATOBJ_SetLong and FLOATOBJ_Sub
*/
_FLOATOBJ_SubLong@8:
-.global _FLOATOBJ_SubLong@8
+PUBLIC _FLOATOBJ_SubLong@8
push ebp
mov ebp, esp
sub esp, 8 /* Make room for a FLOATOBJ on the stack */
@@ -1140,7 +1140,7 @@
*
*/
_FLOATOBJ_Neg@4:
-.global _FLOATOBJ_Neg@4
+PUBLIC _FLOATOBJ_Neg@4
push ebp
mov ebp, esp
@@ -1150,5 +1150,5 @@
pop ebp /* Return */
ret 4
-
+END
/* EOF */
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/i386/atan2_asm.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/misc/i386/atan2_asm.s [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/misc/i386/atan2_asm.s [iso-8859-1] Fri
Nov 19 18:51:50 2010
@@ -33,13 +33,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <asm.inc>
-.globl _atan2
-
-.intel_syntax noprefix
+/* FUNCTIONS ***************************************************************/
+.code
-/* FUNCTIONS ***************************************************************/
-
+PUBLIC _atan2
_atan2:
push ebp
mov ebp,esp
@@ -49,3 +49,5 @@
mov esp,ebp
pop ebp
ret
+
+END
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/i386/ceil_asm.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/misc/i386/ceil_asm.s [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/misc/i386/ceil_asm.s [iso-8859-1] Fri
Nov 19 18:51:50 2010
@@ -33,13 +33,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
-.globl _ceil
-.intel_syntax noprefix
+#include <asm.inc>
/* FUNCTIONS ***************************************************************/
+.code
+PUBLIC _ceil
_ceil:
push ebp
mov ebp,esp
@@ -47,7 +47,7 @@
fld qword ptr [ebp+8] // Load real from stack
fstcw [ebp-2] // Save control word
fclex // Clear exceptions
- mov word ptr [ebp-4],0xb63 // Rounding control word
+ mov word ptr [ebp-4],HEX(b63) // Rounding control word
fldcw [ebp-4] // Set new rounding control
frndint // Round to integer
fclex // Clear exceptions
@@ -55,3 +55,5 @@
mov esp,ebp // Deallocate temporary space
pop ebp
ret
+
+END
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/i386/cos_asm.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/misc/i386/cos_asm.s [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/misc/i386/cos_asm.s [iso-8859-1] Fri
Nov 19 18:51:50 2010
@@ -33,13 +33,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
-.globl _cos
-.intel_syntax noprefix
+#include <asm.inc>
/* FUNCTIONS ***************************************************************/
+.code
+PUBLIC _cos
_cos:
push ebp
mov ebp,esp // Point to the stack frame
@@ -47,3 +47,5 @@
fcos // Take the cosine
pop ebp
ret
+
+END
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/i386/floor_asm.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/misc/i386/floor_asm.s [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/misc/i386/floor_asm.s [iso-8859-1] Fri
Nov 19 18:51:50 2010
@@ -33,13 +33,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
-.globl _floor
-
-.intel_syntax noprefix
+
+#include <asm.inc>
/* FUNCTIONS ***************************************************************/
+.code
+PUBLIC _floor
_floor:
push ebp
mov ebp,esp
@@ -47,7 +47,7 @@
fld qword ptr [ebp+8] // Load real from stack
fstcw [ebp-2] // Save control word
fclex // Clear exceptions
- mov word ptr [ebp-4],0x763 // Rounding control word
+ mov word ptr [ebp-4],HEX(763) // Rounding control word
fldcw [ebp-4] // Set new rounding control
frndint // Round to integer
fclex // Clear exceptions
@@ -55,3 +55,5 @@
mov esp,ebp
pop ebp
ret
+
+END
Modified: branches/cmake-bringup/subsystems/win32/win32k/misc/i386/sin_asm.s
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/misc/i386/sin_asm.s [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/misc/i386/sin_asm.s [iso-8859-1] Fri
Nov 19 18:51:50 2010
@@ -33,13 +33,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
-.globl _sin
-.intel_syntax noprefix
+#include <asm.inc>
/* FUNCTIONS ***************************************************************/
+.code
+PUBLIC _sin
_sin:
push ebp // Save register bp
mov ebp,esp // Point to the stack frame
@@ -47,3 +47,5 @@
fsin // Take the sine
pop ebp // Restore register bp
ret
+
+END