Author: tkreuzer
Date: Fri Oct 14 08:33:22 2011
New Revision: 54131
URL:
http://svn.reactos.org/svn/reactos?rev=54131&view=rev
Log:
[CRT]
- Remove _fltused from alldiv_asm.s / mscmain.c and use fltused.c instead.
- Remove amd64/alldiv.S
- Implement amd64 ceil, ceilf with sse
[NTOSKNRL]
- Fix amd64 exports
[ASM]
- Fix amd64 asm files to conform to the new syntax
Removed:
trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S
Modified:
trunk/reactos/boot/freeldr/bootsect/ext2.S
trunk/reactos/dll/win32/kernel32/client/amd64/fiber.S
trunk/reactos/lib/rtl/amd64/except_asm.S
trunk/reactos/lib/rtl/amd64/rtlmem.S
trunk/reactos/lib/sdk/crt/crt.cmake
trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s
trunk/reactos/lib/sdk/crt/except/amd64/seh.s
trunk/reactos/lib/sdk/crt/float/amd64/clearfp.S
trunk/reactos/lib/sdk/crt/float/amd64/fpreset.S
trunk/reactos/lib/sdk/crt/float/amd64/getsetfpcw.S
trunk/reactos/lib/sdk/crt/float/amd64/logb.S
trunk/reactos/lib/sdk/crt/libcntpr.cmake
trunk/reactos/lib/sdk/crt/math/amd64/ceil.S
trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S
trunk/reactos/lib/sdk/crt/math/amd64/floor.S
trunk/reactos/lib/sdk/crt/math/amd64/floorf.S
trunk/reactos/lib/sdk/crt/math/i386/alldiv_asm.s
trunk/reactos/lib/sdk/crt/misc/fltused.c
trunk/reactos/lib/sdk/crt/msvcrtex.cmake
trunk/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s
trunk/reactos/lib/sdk/crt/startup/mscmain.c
trunk/reactos/ntoskrnl/include/internal/amd64/mm.h
trunk/reactos/ntoskrnl/ke/amd64/boot.S
trunk/reactos/ntoskrnl/ke/amd64/thrdini.c
trunk/reactos/ntoskrnl/ke/amd64/trap.S
trunk/reactos/ntoskrnl/ntoskrnl.spec
Modified: trunk/reactos/boot/freeldr/bootsect/ext2.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/ext2…
==============================================================================
--- trunk/reactos/boot/freeldr/bootsect/ext2.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/bootsect/ext2.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -683,4 +683,6 @@
.word HEX(0aa55) // BootSector signature
+.endcode16
+
END
Modified: trunk/reactos/dll/win32/kernel32/client/amd64/fiber.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/amd64/fiber.S [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/amd64/fiber.S [iso-8859-1] Fri Oct 14 08:33:22
2011
@@ -17,7 +17,7 @@
/* FIXME: TODO */
ret
-ENDFUNC BaseFiberStartup
+ENDFUNC
PUBLIC SwitchToFiber
@@ -27,6 +27,6 @@
UNIMPLEMENTED BaseFiberStartup
/* FIXME: TODO */
ret
-ENDFUNC SwitchToFiber
+ENDFUNC
END
Modified: trunk/reactos/lib/rtl/amd64/except_asm.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/amd64/except_asm.S…
==============================================================================
--- trunk/reactos/lib/rtl/amd64/except_asm.S [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/amd64/except_asm.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -15,7 +15,7 @@
.code64
-/*
+/*
* VOID NTAPI
* RtlCaptureContext(
* PCONTEXT ContextRecord); <rcx>
@@ -96,7 +96,7 @@
/* Cleanup stack and return */
add rsp, 8
ret
-.ENDP RtlCaptureContext
+.ENDP
END
Modified: trunk/reactos/lib/rtl/amd64/rtlmem.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/amd64/rtlmem.S?rev…
==============================================================================
--- trunk/reactos/lib/rtl/amd64/rtlmem.S [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/amd64/rtlmem.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -2,7 +2,7 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Run-Time Library
* PURPOSE: Memory functions for amd64
- * FILE: lib/rtl/i386/rtlswap.S
+ * FILE: lib/rtl/amd64/rtlmem.S
* PROGRAMER: Timo Kreuzer (timo.kreuzer(a)reactos.org)
*/
@@ -14,7 +14,7 @@
.code64
-/* SIZE_T
+/* SIZE_T
* RtlCompareMemory(
* IN CONST VOID *Source1, <rcx>
* IN CONST VOID *Source2, <rdx>
@@ -81,7 +81,7 @@
pop rdi
pop rsi
ret
-.endp RtlCompareMemory
+.endp
END
Modified: trunk/reactos/lib/sdk/crt/crt.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.cmake?rev=…
==============================================================================
--- trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -123,6 +123,7 @@
misc/amsg.c
misc/assert.c
misc/environ.c
+ misc/fltused.c
misc/getargs.c
misc/i10output.c
misc/initterm.c
@@ -384,7 +385,6 @@
float/amd64/fpreset.S
float/amd64/logb.S
float/i386/statfp.c
- math/amd64/alldiv.S
math/amd64/atan.S
math/amd64/atan2.S
math/amd64/ceil.S
Modified: trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/amd64/c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s [iso-8859-1] Fri Oct 14 08:33:22
2011
@@ -20,13 +20,13 @@
.endprolog
UNIMPLEMENTED chkstk
ret
-ENDFUNC __chkstk
+ENDFUNC
FUNC __alloca_probe
.endprolog
UNIMPLEMENTED alloca_probe
ret
-ENDFUNC __alloca_probe
+ENDFUNC
END
/* EOF */
Modified: trunk/reactos/lib/sdk/crt/except/amd64/seh.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/amd64/s…
==============================================================================
--- trunk/reactos/lib/sdk/crt/except/amd64/seh.s [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/except/amd64/seh.s [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -30,36 +30,36 @@
FUNC _unwind_handler
.endprolog
ret
-ENDFUNC _unwind_handler
+ENDFUNC
FUNC _global_unwind2
.endprolog
ret
-ENDFUNC _global_unwind2
+ENDFUNC
FUNC _abnormal_termination
.endprolog
ret
-ENDFUNC _abnormal_termination
+ENDFUNC
FUNC _local_unwind
.endprolog
ret
-ENDFUNC _local_unwind
+ENDFUNC
FUNC _local_unwind2
.endprolog
ret
-ENDFUNC _local_unwind2
+ENDFUNC
FUNC _except_handler2
.endprolog
ret
-ENDFUNC _except_handler2
+ENDFUNC
FUNC _except_handler3
.endprolog
ret
-ENDFUNC _except_handler3
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/float/amd64/clearfp.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/float/amd64/cl…
==============================================================================
--- trunk/reactos/lib/sdk/crt/float/amd64/clearfp.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/float/amd64/clearfp.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -10,6 +10,6 @@
.ENDPROLOG
fnclex
-ENDFUNC _clearfp
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/float/amd64/fpreset.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/float/amd64/fp…
==============================================================================
--- trunk/reactos/lib/sdk/crt/float/amd64/fpreset.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/float/amd64/fpreset.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -6,6 +6,6 @@
FUNC _fpreset
.endprolog
fninit
-ENDFUNC _fpreset
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/float/amd64/getsetfpcw.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/float/amd64/ge…
==============================================================================
--- trunk/reactos/lib/sdk/crt/float/amd64/getsetfpcw.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/float/amd64/getsetfpcw.S [iso-8859-1] Fri Oct 14 08:33:22
2011
@@ -11,7 +11,7 @@
mov rax, [rsp]
add rsp, 8
ret
-ENDFUNC __getfpcw87
+ENDFUNC
PUBLIC __setfpcw87
FUNC __setfpcw87
@@ -19,6 +19,6 @@
.ENDPROLOG
ldmxcsr [rsp + 8]
ret
-ENDFUNC __setfpcw87
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/float/amd64/logb.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/float/amd64/lo…
==============================================================================
--- trunk/reactos/lib/sdk/crt/float/amd64/logb.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/float/amd64/logb.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -11,6 +11,6 @@
fxtract
fstp st
ret
-ENDFUNC _logb
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/libcntpr.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/libcntpr.cmake…
==============================================================================
--- trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -9,6 +9,7 @@
mem/memccpy.c
mem/memcmp.c
mem/memicmp.c
+ misc/fltused.c
printf/_snprintf.c
printf/_snwprintf.c
printf/_vcprintf.c
@@ -104,7 +105,6 @@
setjmp/amd64/setjmp.s
math/cos.c
math/sin.c
- math/amd64/alldiv.S
math/amd64/atan.S
math/amd64/atan2.S
math/amd64/ceil.S
Removed: trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/all…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S (removed)
@@ -1,30 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS system libraries
- * PURPOSE: Implementation of alldiv
- * FILE: lib/sdk/crt/math/amd64/alldiv.S
- * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org)
- */
-
-/* INCLUDES ******************************************************************/
-
-#include <asm.inc>
-
-/* DATA **********************************************************************/
-.code64
-
-PUBLIC _fltused
-_fltused:
- .long HEX(9875)
-
-/* CODE **********************************************************************/
-.code64
-
-FUNC alldiv
- .endprolog
- UNIMPLEMENTED alldiv
- ret
-
-ENDFUNC alldiv
-
-END
Modified: trunk/reactos/lib/sdk/crt/math/amd64/ceil.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/cei…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/amd64/ceil.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/amd64/ceil.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -14,9 +14,42 @@
/* CODE **********************************************************************/
.code64
+/* ceil(x) = - floor(-x)
+ */
PUBLIC ceil
-ceil:
- UNIMPLEMENTED ceil
+.PROC ceil
+ sub rsp, 16
+ .ENDPROLOG
+
+ /* Duplicate the bits into rax */
+ movd rax, xmm0
+
+ /* Invert the sign bit */
+ rol rax, 1
+ xor al, 1
+ ror rax, 1
+
+ /* Copy back to xmm0 */
+ movd xmm0, rax
+
+ /* Truncate xmm0 to integer (double precision) */
+ cvttsd2si rcx, xmm0
+
+ /* Shift all bits to the right, keeping the sign bit */
+ shr rax, 63
+
+ /* Substract the sign bit from the truncated value, so that
+ we get the correct result for negative values. */
+ sub rcx, rax
+
+ /* Now compensate for the previous negation */
+ neg rcx
+
+ /* Convert the result back to xmm0 (double precision) */
+ cvtsi2sd xmm0, rcx
+
+ add rsp, 16
ret
+.ENDP
END
Modified: trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/cei…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -19,29 +19,33 @@
sub rsp, 16
.ENDPROLOG
- /* Put parameter on the stack */
- movss dword ptr [rsp], xmm0
- fld dword ptr [rsp]
+ /* Duplicate the bits into eax (zero exteneded to rax) */
+ movd eax, xmm0
- /* Change fpu control word to round up */
- fstcw [rsp + 8]
- mov eax, [rsp + 8]
- or eax, HEX(00800)
- and eax, HEX(0fbff)
- mov [rsp + 12], eax
- fldcw [rsp + 12]
+ /* Invert the sign bit */
+ xor eax, HEX(80000000)
- /* Round to integer */
- frndint
+ /* Copy back to xmm0 */
+ movd xmm0, eax
- /* Restore fpu control word */
- fldcw [rsp + 8]
+ /* Truncate xmm0 to integer (single precision) */
+ cvttss2si rcx, xmm0
- fstp dword ptr [rsp]
- movss xmm0, dword ptr [rsp]
+ /* Shift all bits to the right, keeping the sign bit */
+ shr rax, 31
+
+ /* Add the sign bit from the truncated value, so that
+ we get the correct result for negative values. */
+ add rcx, rax
+
+ /* Now compensate for the previous negation */
+ neg ecx
+
+ /* Convert the result back to xmm0 (single precision) */
+ cvtsi2ss xmm0, rcx
add rsp, 16
ret
-ENDFUNC ceilf
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/math/amd64/floor.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/flo…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/amd64/floor.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/amd64/floor.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -36,6 +36,6 @@
add rsp, 16
ret
-ENDFUNC floor
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/math/amd64/floorf.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/flo…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/amd64/floorf.S [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/amd64/floorf.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -36,6 +36,6 @@
add rsp, 16
ret
-ENDFUNC floorf
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/math/i386/alldiv_asm.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/alld…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/i386/alldiv_asm.s [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/i386/alldiv_asm.s [iso-8859-1] Fri Oct 14 08:33:22
2011
@@ -6,20 +6,20 @@
* PROGRAMER: Alex Ionescu (alex(a)relsoft.net)
*
* Copyright (C) 2002 Michael Ringgaard.
- * All rights reserved.
+ * 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.
+ *
+ * 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.
+ * 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.
+ * 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
@@ -30,22 +30,17 @@
* 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
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <asm.inc>
PUBLIC __alldiv
-PUBLIC __fltused
/* DATA ********************************************************************/
.data
ASSUME CS:NOTHING, DS:NOTHING, ES:NOTHING, FS:NOTHING, GS:NOTHING
-
-__fltused:
- .long HEX(9875)
-
/* FUNCTIONS ***************************************************************/
.code
Modified: trunk/reactos/lib/sdk/crt/misc/fltused.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/misc/fltused.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/misc/fltused.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/misc/fltused.c [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -1,2 +1,2 @@
-int _fltused;
+int _fltused = 0x9875;
Modified: trunk/reactos/lib/sdk/crt/msvcrtex.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/msvcrtex.cmake…
==============================================================================
--- trunk/reactos/lib/sdk/crt/msvcrtex.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/msvcrtex.cmake [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -51,8 +51,7 @@
elseif(ARCH MATCHES amd64)
list(APPEND MSVCRTEX_SOURCE
except/amd64/chkstk_asm.s
- except/amd64/chkstk_ms.s
- math/amd64/alldiv.S)
+ except/amd64/chkstk_ms.s)
endif()
if(MSVC)
Modified: trunk/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/setjmp/amd64/s…
==============================================================================
--- trunk/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -77,7 +77,7 @@
movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
xor rax, rax
ret
-ENDFUNC _setjmp
+ENDFUNC
/*!
* int _setjmpex(jmp_buf _Buf,void *_Ctx);
@@ -119,7 +119,7 @@
movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
xor rax, rax
ret
-ENDFUNC _setjmpex
+ENDFUNC
/*!
@@ -164,6 +164,6 @@
jnz l2
inc rax
l2: jmp r8
-ENDFUNC longjmp
+ENDFUNC
END
Modified: trunk/reactos/lib/sdk/crt/startup/mscmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/startup/mscmai…
==============================================================================
--- trunk/reactos/lib/sdk/crt/startup/mscmain.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/startup/mscmain.c [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -6,8 +6,6 @@
#include <windows.h>
#include <stdlib.h>
-
-int _fltused;
int __mingw_init_ehandler (void)
{
Modified: trunk/reactos/ntoskrnl/include/internal/amd64/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] Fri Oct 14 08:33:22
2011
@@ -78,7 +78,6 @@
/* MMPTE related defines */
#define MM_EMPTY_PTE_LIST ((ULONG64)0xFFFFFFFF)
#define MM_EMPTY_LIST ((ULONG_PTR)-1)
-#define PTE_PER_PAGE 0x200
#define ADDR_TO_PAGE_TABLE(v) ((ULONG)(((ULONG_PTR)(v)) / (512 * PAGE_SIZE)))
#define ADDR_TO_PDE_OFFSET(v) ((ULONG)((((ULONG_PTR)(v)) / (512 * PAGE_SIZE))))
Modified: trunk/reactos/ntoskrnl/ke/amd64/boot.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/boot.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/boot.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/boot.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -36,7 +36,7 @@
jmp KiSystemStartupBootStack
-.ENDP KiSwitchToBootStack
+.ENDP
END
Modified: trunk/reactos/ntoskrnl/ke/amd64/thrdini.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/thrdini.…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/thrdini.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/thrdini.c [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -90,7 +90,7 @@
/* Set the Thread's NPX State */
Thread->NpxState = 0xA;
- Thread->DispatcherHeader.NpxIrql = PASSIVE_LEVEL;
+ Thread->Header.NpxIrql = PASSIVE_LEVEL;
/* Disable any debug regiseters */
Context->ContextFlags &= ~CONTEXT_DEBUG_REGISTERS;
Modified: trunk/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/trap.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -135,7 +135,7 @@
add rsp, EXCEPTION_RECORD_LENGTH + KEXCEPTION_FRAME_LENGTH
ret
-.ENDP InternalDispatchException
+.ENDP
/* SOFTWARE INTERRUPT SERVICES ***********************************************/
@@ -153,7 +153,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiDivideErrorFault
+ENDFUNC
PUBLIC KiDebugTrapOrFault
@@ -174,7 +174,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiDebugTrapOrFault
+ENDFUNC
PUBLIC KiNmiInterrupt
@@ -187,7 +187,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiNmiInterrupt
+ENDFUNC
PUBLIC KiBreakpointTrap
@@ -200,7 +200,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiBreakpointTrap
+ENDFUNC
PUBLIC KiOverflowTrap
@@ -216,7 +216,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiOverflowTrap
+ENDFUNC
PUBLIC KiBoundFault
@@ -240,7 +240,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiBoundFault
+ENDFUNC
PUBLIC KiInvalidOpcodeFault
@@ -265,7 +265,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiInvalidOpcodeFault
+ENDFUNC
PUBLIC KiNpxNotAvailableFault
@@ -287,7 +287,7 @@
KiNpxNotAvailableFaultExit:
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiNpxNotAvailableFault
+ENDFUNC
PUBLIC KiDoubleFaultAbort
@@ -298,7 +298,7 @@
/* Bugcheck */
Fatal 8 // EXCEPTION_DOUBLE_FAULT
jmp $
-ENDFUNC KiDoubleFaultAbort
+ENDFUNC
PUBLIC KiNpxSegmentOverrunAbort
@@ -309,7 +309,7 @@
/* Bugcheck */
Fatal EXCEPTION_NPX_OVERRUN
jmp $
-ENDFUNC KiNpxSegmentOverrunAbort
+ENDFUNC
PUBLIC KiInvalidTssFault
@@ -320,7 +320,7 @@
/* Bugcheck */
Fatal EXCEPTION_INVALID_TSS
jmp $
-ENDFUNC KiInvalidTssFault
+ENDFUNC
PUBLIC KiSegmentNotPresentFault
@@ -331,7 +331,7 @@
/* Bugcheck */
Fatal EXCEPTION_SEGMENT_NOT_PRESENT
jmp $
-ENDFUNC KiSegmentNotPresentFault
+ENDFUNC
PUBLIC KiStackFault
@@ -342,7 +342,7 @@
/* Bugcheck */
Fatal EXCEPTION_STACK_FAULT
jmp $
-ENDFUNC KiStackFault
+ENDFUNC
PUBLIC KiGeneralProtectionFault
@@ -376,7 +376,7 @@
/* Return */
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiGeneralProtectionFault
+ENDFUNC
PUBLIC KiPageFault
@@ -435,7 +435,7 @@
PageFaultReturn:
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiPageFault
+ENDFUNC
PUBLIC KiFloatingErrorFault
@@ -448,7 +448,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiFloatingErrorFault
+ENDFUNC
PUBLIC KiAlignmentFault
@@ -459,7 +459,7 @@
/* Bugcheck */
Fatal EXCEPTION_ALIGNMENT_CHECK
jmp $
-ENDFUNC KiAlignmentFault
+ENDFUNC
PUBLIC KiMcheckAbort
@@ -470,7 +470,7 @@
/* Bugcheck */
Fatal HEX(12)
jmp $
-ENDFUNC KiMcheckAbort
+ENDFUNC
PUBLIC KiXmmException
@@ -492,7 +492,7 @@
KiXmmExit:
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiXmmException
+ENDFUNC
PUBLIC KiRaiseAssertion
@@ -508,7 +508,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiRaiseAssertion
+ENDFUNC
PUBLIC KiDebugServiceTrap
@@ -524,7 +524,7 @@
/* Return */
ExitTrap TF_SAVE_ALL
-.ENDP KiDebugServiceTrap
+.ENDP
PUBLIC KiApcInterrupt
@@ -554,7 +554,7 @@
/* Return */
ExitTrap (TF_VOLATILES or TF_IRQL)
-.ENDP KiApcInterrupt
+.ENDP
PUBLIC KiDpcInterrupt
@@ -576,7 +576,7 @@
/* Return */
ExitTrap (TF_VOLATILES or TF_IRQL)
-.ENDP KiDpcInterrupt
+.ENDP
PUBLIC KiIpiInterrupt
@@ -595,7 +595,7 @@
/* Return */
ExitTrap (TF_VOLATILES or TF_IRQL)
-.ENDP KiIpiInterrupt
+.ENDP
PUBLIC KiUnexpectedInterrupt
@@ -616,7 +616,7 @@
#endif
/* Return */
ExitTrap TF_SAVE_ALL
-ENDFUNC KiUnexpectedInterrupt
+ENDFUNC
#ifdef _MSC_VER
#undef lgdt
Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Fri Oct 14 08:33:22 2011
@@ -627,7 +627,7 @@
@ stdcall KeLeaveCriticalRegion() _KeLeaveCriticalRegion
@ stdcall KeLeaveGuardedRegion() _KeLeaveGuardedRegion
@ extern KeLoaderBlock
-@ cdecl -arch=x86_64 KeLowerIrql(long)
+@ cdecl -arch=x86_64 -private KeLowerIrql(long)
@ extern KeNumberProcessors _KeNumberProcessors
@ stdcall -arch=i386,arm KeProfileInterrupt(ptr)
@ stdcall KeProfileInterruptWithSource(ptr long)
@@ -641,7 +641,7 @@
@ stdcall -arch=i386,arm KeQuerySystemTime(ptr)
@ stdcall -arch=i386,arm KeQueryTickCount(ptr)
@ stdcall KeQueryTimeIncrement()
-@ cdecl -arch=x86_64 KeRaiseIrqlToDpcLevel()
+@ cdecl -arch=x86_64 -private KeRaiseIrqlToDpcLevel()
@ stdcall KeRaiseUserException(long)
@ stdcall KeReadStateEvent(ptr)
@ stdcall KeReadStateMutant(ptr)
@@ -654,6 +654,7 @@
@ stdcall KeRegisterNmiCallback(ptr ptr)
@ fastcall KeReleaseGuardedMutex(ptr)
@ fastcall KeReleaseGuardedMutexUnsafe(ptr)
+@ cdecl -arch=x86_64 KeReleaseInStackQueuedSpinLock(ptr)
@ fastcall KeReleaseInStackQueuedSpinLockForDpc(ptr)
@ fastcall KeReleaseInStackQueuedSpinLockFromDpcLevel(ptr)
@ stdcall KeReleaseInterruptSpinLock(ptr long)
@@ -716,7 +717,7 @@
@ fastcall -arch=i386,arm KefAcquireSpinLockAtDpcLevel(ptr)
@ fastcall -arch=i386,arm KefReleaseSpinLockFromDpcLevel(ptr)
@ stdcall -arch=i386 Kei386EoiHelper()
-@ cdecl -arch=x86_64 KfRaiseIrql(long)
+@ cdecl -arch=x86_64 -private KfRaiseIrql(long)
@ fastcall -arch=i386 KiEoiHelper(ptr)
@ fastcall -arch=i386,arm KiAcquireSpinLock(ptr)
@ extern KiBugCheckData
@@ -1080,6 +1081,8 @@
@ stdcall RtlConvertSidToUnicodeString(ptr ptr long)
@ stdcall RtlConvertUlongToLargeInteger(long)
@ stdcall RtlCopyLuid(ptr ptr)
+@ stdcall -arch=x86_64 RtlCopyMemory(ptr ptr int64) memmove
+@ stdcall -arch=x86_64 RtlCopyMemoryNonTemporal(ptr ptr int64) memmove
@ stdcall RtlCopyRangeList(ptr ptr)
@ stdcall RtlCopySid(long ptr ptr)
@ stdcall RtlCopyString(ptr ptr)