Author: tkreuzer
Date: Sat Jan 30 04:11:39 2010
New Revision: 45335
URL: http://svn.reactos.org/svn/reactos?rev=45335&view=rev
Log:
use .altmacro for gas and hack the UNIMPLEMENTED macro
Modified:
branches/ros-amd64-bringup/reactos/include/reactos/asm.h
Modified: branches/ros-amd64-bringup/reactos/include/reactos/asm.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/asm.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/asm.h [iso-8859-1] Sat Jan 30 04:11:39 2010
@@ -51,6 +51,8 @@
/* Force intel syntax */
.intel_syntax noprefix
.code64
+
+.altmacro
/* Hex numbers need to be in 0x1AB format */
#define HEX(x) 0x##x
@@ -138,9 +140,11 @@
.macro .endprolog
.endm
-.macro UNIMPLEMENTED2 file, line, func
+// Note the file1. This is a hack, as "\file" doesn't work with __FILE__, when
+// .altmacro is specified.
+.macro UNIMPLEMENTED2 file1, line, func
+
jmp 3f
- .equ expr, 12
1: .asciz "\func"
2: .asciz "\file"
3:
Author: tkreuzer
Date: Sat Jan 30 02:16:42 2010
New Revision: 45332
URL: http://svn.reactos.org/svn/reactos?rev=45332&view=rev
Log:
More macros and fixes
Modified:
branches/ros-amd64-bringup/reactos/include/reactos/asm.h
Modified: branches/ros-amd64-bringup/reactos/include/reactos/asm.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/asm.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/asm.h [iso-8859-1] Sat Jan 30 02:16:42 2010
@@ -13,6 +13,9 @@
/* Hex numbers need to be in 01ABh format */
#define HEX(x) 0##x##h
+
+/* Macro values need to be marked */
+#define VAL(x) x
/* MASM/ML doesn't want explicit [rip] addressing */
#define RIP(address) address
@@ -47,11 +50,15 @@
/* Hex numbers need to be in 0x1AB format */
#define HEX(x) 0x##x
+/* Macro values need to be marked */
+#define VAL(x) \x
+
/* GAS needs explicit [rip] addressing */
#define RIP(address) address##[rip]
/* Due to MASM's reverse syntax, we are forced to use a precompiler macro */
-#define MACRO(name, ...) .MACRO name, __VA_ARGS__
+#define MACRO(...) .macro __VA_ARGS__
+#define ENDM .endm
/* To avoid reverse syntax we provide a new macro .PROC, replacing PROC... */
.macro .PROC name
@@ -77,6 +84,12 @@
#define REPEAT .rept
#define ENDR .endr
+/* MASM compatible EXTERN */
+.macro EXTERN name
+.endm
+
+/* MASM needs an END tag */
+#define END
/* Macros for x64 stack unwind OPs */