mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Update macros a bit more
svn path=/branches/ros-amd64-bringup/; revision=45330
This commit is contained in:
@@ -2,12 +2,18 @@
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel
|
||||
* FILE: ntoskrnl/include/amd64/asmmacro.S
|
||||
* PURPOSE: ASM macros for for GAS and ML64
|
||||
* PURPOSE: ASM macros for for GAS and MASM/ML64
|
||||
* PROGRAMMERS: Timo Kreuzer ([email protected])
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
/* Allow ".name" identifiers */
|
||||
OPTION DOTNAME
|
||||
|
||||
/* Hex numbers need to be in 01ABh format */
|
||||
#define HEX(x) 0##x##h
|
||||
|
||||
/* MASM/ML doesn't want explicit [rip] addressing */
|
||||
#define RIP(address) address
|
||||
|
||||
@@ -24,6 +30,13 @@ ENDM
|
||||
name ENDP
|
||||
ENDM
|
||||
|
||||
/* MASM doesn't have an ASCIIZ macro */
|
||||
.ASCIIZ MACRO text
|
||||
DB text, 0
|
||||
ENDM
|
||||
|
||||
/* We need this to distinguish repeat from macros */
|
||||
#define ENDR ENDM
|
||||
|
||||
#else /***********************************************************************/
|
||||
|
||||
@@ -31,6 +44,9 @@ ENDM
|
||||
.intel_syntax noprefix
|
||||
.code64
|
||||
|
||||
/* Hex numbers need to be in 0x1AB format */
|
||||
#define HEX(x) 0x##x
|
||||
|
||||
/* GAS needs explicit [rip] addressing */
|
||||
#define RIP(address) address##[rip]
|
||||
|
||||
@@ -46,7 +62,7 @@ ENDM
|
||||
.endm
|
||||
|
||||
/* ... and .ENDP, replacing ENDP */
|
||||
.macro .ENDP
|
||||
.macro .ENDP name
|
||||
.cfi_endproc
|
||||
.endfunc
|
||||
.endm
|
||||
@@ -54,6 +70,14 @@ ENDM
|
||||
/* MASM compatible PUBLIC */
|
||||
#define PUBLIC .global
|
||||
|
||||
/* MASM compatible ALIGN */
|
||||
#define ALIGN .align
|
||||
|
||||
/* MASM compatible REPEAT, additional ENDR */
|
||||
#define REPEAT .rept
|
||||
#define ENDR .endr
|
||||
|
||||
|
||||
/* Macros for x64 stack unwind OPs */
|
||||
|
||||
.macro .allocstack size
|
||||
|
||||
Reference in New Issue
Block a user