Author: tkreuzer
Date: Thu Jan 27 13:37:21 2011
New Revision: 50512

URL: http://svn.reactos.org/svn/reactos?rev=50512&view=rev
Log:
[CMAKE]
ML64 compatibility fixes for amd64 assembly

Modified:
    branches/cmake-bringup/lib/sdk/crt/except/amd64/chkstk_asm.s
    branches/cmake-bringup/lib/sdk/crt/except/amd64/seh.s
    branches/cmake-bringup/lib/sdk/crt/math/amd64/alldiv.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/atan.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/atan2.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/ceil.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/ceilf.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/exp.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/fabs.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/floor.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/floorf.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/fmod.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/fmodf.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/ldexp.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/log.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/log10.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/pow.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrt.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrtf.S
    branches/cmake-bringup/lib/sdk/crt/math/amd64/tan.S
    branches/cmake-bringup/lib/sdk/crt/setjmp/amd64/setjmp.s

Modified: branches/cmake-bringup/lib/sdk/crt/except/amd64/chkstk_asm.s
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/except/amd64/chkstk_asm.s?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/except/amd64/chkstk_asm.s [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/except/amd64/chkstk_asm.s [iso-8859-1] 
Thu Jan 27 13:37:21 2011
@@ -10,21 +10,25 @@
 
 #include <asm.inc>
 
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC MsgUnimplemented
 MsgUnimplemented:
 .asciz "WARNING:  %s at %s:%d is UNIMPLEMENTED!\n"
 
 
-.proc _chkstk
+FUNC _chkstk
+    .endprolog
     UNIMPLEMENTED chkstk
     ret
-.endp
+ENDFUNC _chkstk
 
-.proc _alloca_probe
+FUNC _alloca_probe
+    .endprolog
     UNIMPLEMENTED alloca_probe
     ret
-.endp
+ENDFUNC _alloca_probe
 
 END
 /* EOF */

Modified: branches/cmake-bringup/lib/sdk/crt/except/amd64/seh.s
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/except/amd64/seh.s?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/except/amd64/seh.s [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/except/amd64/seh.s [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -17,42 +17,43 @@
 
 /* GLOBALS *******************************************************************/
 
-.globl _global_unwind2
-.globl _local_unwind2
-.globl _abnormal_termination
-.globl _except_handler2
-.globl _except_handler3
+PUBLIC _global_unwind2
+PUBLIC _local_unwind2
+PUBLIC _abnormal_termination
+PUBLIC _except_handler2
+PUBLIC _except_handler3
 
-/* FUNCTIONS *****************************************************************/
+/* CODE **********************************************************************/
+.code64
 
-.func _unwind_handler
-_unwind_handler:
+FUNC _unwind_handler
+    .endprolog
     ret
-.endfunc
+ENDFUNC _unwind_handler
 
-.func _global_unwind2
-_global_unwind2:
+FUNC _global_unwind2
+    .endprolog
     ret
-.endfunc
+ENDFUNC _global_unwind2
 
-.func _abnormal_termination
-_abnormal_termination:
+FUNC _abnormal_termination
+    .endprolog
     ret
-.endfunc
+ENDFUNC _abnormal_termination
 
-.func _local_unwind2
-_local_unwind2:
+FUNC _local_unwind2
+    .endprolog
     ret
-.endfunc
+ENDFUNC _local_unwind2
 
-.func _except_handler2
-_except_handler2:
+FUNC _except_handler2
+    .endprolog
     ret
-.endfunc
+ENDFUNC _except_handler2
 
-.func _except_handler3
-_except_handler3:
+FUNC _except_handler3
+    .endprolog
     ret
-.endfunc
+ENDFUNC _except_handler3
 
 END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/alldiv.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/alldiv.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/alldiv.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/alldiv.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -10,18 +10,21 @@
 
 #include <asm.inc>
 
-/* DATA *********************************************************************/
+/* DATA **********************************************************************/
+.code64
 
 PUBLIC _fltused
 _fltused:
-        .long 0x9875
+        .long HEX(9875)
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
-.proc alldiv
+FUNC alldiv
+    .endprolog
     UNIMPLEMENTED alldiv
     ret
 
-.endp alldiv
+ENDFUNC alldiv
+
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/atan.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/atan.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/atan.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/atan.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,11 +11,12 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
 PUBLIC atan
 atan:
     UNIMPLEMENTED atan
     ret
+
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/atan2.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/atan2.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/atan2.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/atan2.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,11 +11,12 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
 PUBLIC atan2
 atan2:
     UNIMPLEMENTED atan2
     ret
+
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/ceil.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/ceil.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/ceil.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/ceil.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,8 +11,7 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
 PUBLIC ceil
@@ -20,3 +19,4 @@
     UNIMPLEMENTED ceil
     ret
 
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/ceilf.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/ceilf.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/ceilf.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/ceilf.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,8 +11,7 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
 PUBLIC ceilf
@@ -39,7 +38,7 @@
 
     fstp dword ptr [rsp]
     movss xmm0, [rsp]
-    
+
     add rsp, 16
     ret
 

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/exp.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/exp.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/exp.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/exp.S [iso-8859-1] Thu Jan 27 
13:37:21 2011
@@ -11,8 +11,7 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
 PUBLIC exp

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/fabs.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/fabs.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/fabs.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/fabs.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -10,12 +10,12 @@
 
 #include <asm.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
-PUBLIC fabs
-fabs:
+PUBLIC _fabs
+_fabs:
     UNIMPLEMENTED fabs
     ret
 
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/floor.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/floor.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/floor.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/floor.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,8 +11,7 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
 PUBLIC floor

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/floorf.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/floorf.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/floorf.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/floorf.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,8 +11,7 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* FUNCTIONS ****************************************************************/
-
+/* CODE **********************************************************************/
 .code64
 
 PUBLIC floorf

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/fmod.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/fmod.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/fmod.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/fmod.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -10,10 +10,11 @@
 
 #include <asm.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
-PUBLIC fmod
-fmod:
+PUBLIC _fmod
+_fmod:
     UNIMPLEMENTED fmod
     ret
 

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/fmodf.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/fmodf.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/fmodf.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/fmodf.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -10,7 +10,8 @@
 
 #include <asm.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC fmodf
 fmodf:

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/ldexp.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/ldexp.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/ldexp.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/ldexp.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -10,7 +10,8 @@
 
 #include <asm.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC ldexp
 ldexp:

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/log.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/log.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/log.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/log.S [iso-8859-1] Thu Jan 27 
13:37:21 2011
@@ -10,9 +10,12 @@
 
 #include <asm.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC log
 log:
     UNIMPLEMENTED log
     ret
+
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/log10.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/log10.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/log10.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/log10.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -10,10 +10,12 @@
 
 #include <asm.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC log10
 log10:
     UNIMPLEMENTED log10
     ret
 
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/pow.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/pow.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/pow.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/pow.S [iso-8859-1] Thu Jan 27 
13:37:21 2011
@@ -11,10 +11,12 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC pow
 pow:
     UNIMPLEMENTED pow
     ret
 
+END

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrt.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrt.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrt.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrt.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,7 +11,8 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC sqrt
 sqrt:

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrtf.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrtf.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrtf.S [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/sqrtf.S [iso-8859-1] Thu Jan 
27 13:37:21 2011
@@ -11,7 +11,8 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC sqrtf
 sqrtf:

Modified: branches/cmake-bringup/lib/sdk/crt/math/amd64/tan.S
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/math/amd64/tan.S?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/math/amd64/tan.S [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/sdk/crt/math/amd64/tan.S [iso-8859-1] Thu Jan 27 
13:37:21 2011
@@ -11,7 +11,8 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-/* DATA *********************************************************************/
+/* CODE **********************************************************************/
+.code64
 
 PUBLIC tan
 tan:

Modified: branches/cmake-bringup/lib/sdk/crt/setjmp/amd64/setjmp.s
URL: 
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/crt/setjmp/amd64/setjmp.s?rev=50512&r1=50511&r2=50512&view=diff
==============================================================================
--- branches/cmake-bringup/lib/sdk/crt/setjmp/amd64/setjmp.s [iso-8859-1] 
(original)
+++ branches/cmake-bringup/lib/sdk/crt/setjmp/amd64/setjmp.s [iso-8859-1] Thu 
Jan 27 13:37:21 2011
@@ -11,41 +11,45 @@
 #include <asm.inc>
 #include <ksamd64.inc>
 
-#define JUMP_BUFFER_Frame 0x00
-#define JUMP_BUFFER_Rbx   0x08
-#define JUMP_BUFFER_Rsp   0x10
-#define JUMP_BUFFER_Rbp   0x18
-#define JUMP_BUFFER_Rsi   0x20
-#define JUMP_BUFFER_Rdi   0x28
-#define JUMP_BUFFER_R12   0x30
-#define JUMP_BUFFER_R13   0x38
-#define JUMP_BUFFER_R14   0x40
-#define JUMP_BUFFER_R15   0x48
-#define JUMP_BUFFER_Rip   0x50
-#define JUMP_BUFFER_Spare 0x58
-#define JUMP_BUFFER_Xmm6  0x60
-#define JUMP_BUFFER_Xmm7  0x70
-#define JUMP_BUFFER_Xmm8  0x80
-#define JUMP_BUFFER_Xmm9  0x90
-#define JUMP_BUFFER_Xmm10 0xa0
-#define JUMP_BUFFER_Xmm11 0xb0
-#define JUMP_BUFFER_Xmm12 0xc0
-#define JUMP_BUFFER_Xmm13 0xd0
-#define JUMP_BUFFER_Xmm14 0xe0
-#define JUMP_BUFFER_Xmm15 0xf0
+#define JUMP_BUFFER_Frame   0 /* 0x00 */
+#define JUMP_BUFFER_Rbx     8 /* 0x08 */
+#define JUMP_BUFFER_Rsp    16 /* 0x10 */
+#define JUMP_BUFFER_Rbp    24 /* 0x18 */
+#define JUMP_BUFFER_Rsi    32 /* 0x20 */
+#define JUMP_BUFFER_Rdi    40 /* 0x28 */
+#define JUMP_BUFFER_R12    48 /* 0x30 */
+#define JUMP_BUFFER_R13    56 /* 0x38 */
+#define JUMP_BUFFER_R14    64 /* 0x40 */
+#define JUMP_BUFFER_R15    72 /* 0x48 */
+#define JUMP_BUFFER_Rip    80 /* 0x50 */
+#define JUMP_BUFFER_Spare  88 /* 0x58 */
+#define JUMP_BUFFER_Xmm6   96 /* 0x60 */
+#define JUMP_BUFFER_Xmm7  112 /* 0x70 */
+#define JUMP_BUFFER_Xmm8  128 /* 0x80 */
+#define JUMP_BUFFER_Xmm9  144 /* 0x90 */
+#define JUMP_BUFFER_Xmm10 160 /* 0xa0 */
+#define JUMP_BUFFER_Xmm11 176 /* 0xb0 */
+#define JUMP_BUFFER_Xmm12 192 /* 0xc0 */
+#define JUMP_BUFFER_Xmm13 208 /* 0xd0 */
+#define JUMP_BUFFER_Xmm14 224 /* 0xe0 */
+#define JUMP_BUFFER_Xmm15 240 /* 0xf0 */
 
 
 /* FUNCTIONS 
******************************************************************/
+.code64
 
-/*
+/*!
  * int _setjmp(jmp_buf env);
  *
- * Parameters: <rcx> - jmp_buf env
- * Returns:    0
- * Notes:      Sets up the jmp_buf
+ * \param   <rcx> - jmp_buf env
+ * \return  0
+ * \note    Sets up the jmp_buf
  */
 PUBLIC _setjmp
-.proc _setjmp
+FUNC _setjmp
+
+    .endprolog
+
     /* Load rsp as it was before the call into rax */
     lea rax, [rsp + 8]
     /* Load return address into r8 */
@@ -73,18 +77,21 @@
     movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
     xor rax, rax
     ret
-.endp setjmp
+ENDFUNC _setjmp
 
-/*
+/*!
  * int _setjmpex(jmp_buf _Buf,void *_Ctx);
  *
- * Parameters: <rcx> - jmp_buf env
- *             <rdx> - frame
- * Returns:    0
- * Notes:      Sets up the jmp_buf
+ * \param   <rcx> - jmp_buf env
+ * \param   <rdx> - frame
+ * \return  0
+ * \note    Sets up the jmp_buf
  */
 PUBLIC _setjmpex
-.proc _setjmpex
+FUNC _setjmpex
+
+    .endprolog
+
     /* Load rsp as it was before the call into rax */
     lea rax, [rsp + 8]
     /* Load return address into r8 */
@@ -112,19 +119,21 @@
     movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
     xor rax, rax
     ret
-.endp setjmpex
+ENDFUNC _setjmpex
 
 
-/*
+/*!
  * void longjmp(jmp_buf env, int value);
  *
- * Parameters: <rcx> - jmp_buf setup by _setjmp
- *             <rdx> - int     value to return
- * Returns:    Doesn't return
- * Notes:      Non-local goto
+ * \param    <rcx> - jmp_buf setup by _setjmp
+ * \param    <rdx> - int     value to return
+ * \return   Doesn't return
+ * \note     Non-local goto
  */
 PUBLIC longjmp
-.proc longjmp
+FUNC longjmp
+
+    .endprolog
 
     // FIXME: handle frame
 
@@ -152,9 +161,9 @@
     /* return param2 or 1 if it was 0 */
     mov rax, rdx
     test rax, rax
-    jnz 2f
+    jnz l2
     inc rax
-2:  jmp r8
-.endp longjmp
+l2: jmp r8
+ENDFUNC longjmp
 
 END


Reply via email to