[ros-diffs] [tkreuzer] 53333: [ASM] - prefix labels only on x86 - improve syscall stub code

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sat Aug 20 10:39:30 UTC 2011


Author: tkreuzer
Date: Sat Aug 20 10:39:28 2011
New Revision: 53333

URL: http://svn.reactos.org/svn/reactos?rev=53333&view=rev
Log:
[ASM]
- prefix labels only on x86
- improve syscall stub code

Modified:
    trunk/reactos/include/asm/asm.inc
    trunk/reactos/include/asm/syscalls.inc

Modified: trunk/reactos/include/asm/asm.inc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/asm/asm.inc?rev=53333&r1=53332&r2=53333&view=diff
==============================================================================
--- trunk/reactos/include/asm/asm.inc [iso-8859-1] (original)
+++ trunk/reactos/include/asm/asm.inc [iso-8859-1] Sat Aug 20 10:39:28 2011
@@ -32,13 +32,21 @@
 
 /* To avoid reverse syntax we provide a new macro .PROC, replacing PROC... */
 .PROC MACRO name
+#ifdef _M_IX86
     _&name PROC
+#else
+    &name PROC FRAME
+#endif
 ENDM
 #define FUNC .PROC
 
 /* ... and .ENDP, replacing ENDP */
 .ENDP MACRO name
+#ifdef _M_IX86
     _&name ENDP
+#else
+    &name ENDP
+#endif
 ENDM
 #define ENDFUNC .ENDP
 

Modified: trunk/reactos/include/asm/syscalls.inc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/asm/syscalls.inc?rev=53333&r1=53332&r2=53333&view=diff
==============================================================================
--- trunk/reactos/include/asm/syscalls.inc [iso-8859-1] (original)
+++ trunk/reactos/include/asm/syscalls.inc [iso-8859-1] Sat Aug 20 10:39:28 2011
@@ -3,12 +3,14 @@
 #define KUSER_SHARED_SYSCALL HEX(7ffe0300)
 #define KGDT_R0_CODE 8
 MACRO(STUBCODE_U, SyscallId, StackBytes)
+    FPO 0, 0, 0, 0, 0, FRAME_FPO
     mov eax, SyscallId
     mov ecx, KUSER_SHARED_SYSCALL
     call dword ptr [ecx]
     ret StackBytes
 ENDM
 MACRO(STUBCODE_K, SyscallId, StackBytes)
+    FPO 0, 0, 0, 0, 0, FRAME_FPO
     mov eax, SyscallId
     lea edx, [esp + 4]
     pushfd
@@ -18,12 +20,14 @@
 ENDM
 #elif defined(_M_AMD64)
 MACRO(STUBCODE_U, SyscallId, StackBytes)
+    .ENDPROLOG
     mov eax, SyscallId
     mov r10, rcx
     syscall
     ret StackBytes
 ENDM
 MACRO(STUBCODE_K, SyscallId, StackBytes)
+    .ENDPROLOG
     mov eax, SyscallId
     call KiSystemService
     ret StackBytes
@@ -74,7 +78,6 @@
 MACRO(START_PROC, Name, Stackbytes)
     PUBLIC _&Name&@&Stackbytes
     .PROC &Name&@&Stackbytes
-    FPO 0, 0, 0, 0, 0, FRAME_FPO
 ENDM
 MACRO(END_PROC, Name, Stackbytes)
     .ENDP &Name&@&Stackbytes
@@ -87,7 +90,6 @@
 MACRO(START_PROC, Name, Stackbytes)
     PUBLIC &Name
     .PROC &Name
-    FPO 0, 0, 0, 0, 0, FRAME_FPO
 ENDM
 MACRO(END_PROC, Name, Stackbytes)
     .ENDP &Name




More information about the Ros-diffs mailing list