[PSDK] Simplify definition for YieldProcessor and add DbgRaiseAssertion for amd64 in winnt.h

[ASM] Fix some stuff for amd64

svn path=/trunk/; revision=53340
This commit is contained in:
Timo Kreuzer 2011-08-20 15:53:56 +00:00
parent ea4dc61d38
commit 8bc82e23e6
3 changed files with 18 additions and 17 deletions

View file

@ -197,16 +197,22 @@ ENDM
/* To avoid reverse syntax we provide a new macro .PROC, replacing PROC... */
.macro .PROC name
.func \name
#ifdef _X86_
_\name:
#else
\name:
#endif
.cfi_startproc
.equ cfa_current_offset, -8
.endm
#define FUNC .PROC
/* ... and .ENDP, replacing ENDP */
.macro .ENDP name
.cfi_endproc
.endfunc
.endm
#define ENDFUNC .ENDP
/* MASM compatible PUBLIC */
.macro PUBLIC symbol

View file

@ -3318,7 +3318,7 @@ typedef struct _QUOTA_LIMITS {
SIZE_T PagefileLimit;
LARGE_INTEGER TimeLimit;
} QUOTA_LIMITS,*PQUOTA_LIMITS;
typedef struct _QUOTA_LIMITS_EX {
SIZE_T PagedPoolLimit;
SIZE_T NonPagedPoolLimit;
@ -5265,17 +5265,9 @@ MemoryBarrier(VOID)
#error Unknown architecture
#endif
#if defined(_M_IX86)
#if defined(_M_IX86) || defined(_M_AMD64)
#ifdef _MSC_VER
#pragma intrinsic(__int2c)
#pragma intrinsic(_mm_pause)
#define YieldProcessor _mm_pause
#else
#define YieldProcessor() __asm__ __volatile__("pause");
#define __int2c() __asm__ __volatile__("int $0x2c");
#endif
FORCEINLINE
VOID
@ -5284,13 +5276,6 @@ DbgRaiseAssertionFailure(VOID)
__int2c();
}
#elif defined (_M_AMD64)
#ifdef _MSC_VER
#pragma intrinsic(_mm_pause)
#define YieldProcessor _mm_pause
#else
#define YieldProcessor() __asm__ __volatile__("pause");
#endif
#elif defined(_M_PPC)
#define YieldProcessor() __asm__ __volatile__("nop");
#elif defined(_M_MIPS)

View file

@ -149,16 +149,22 @@ ENDM
/* To avoid reverse syntax we provide a new macro .PROC, replacing PROC... */
.macro .PROC name
.func \name
#ifdef _X86_
_\name:
#else
\name:
#endif
.cfi_startproc
.equ cfa_current_offset, -8
.endm
#define FUNC .PROC
/* ... and .ENDP, replacing ENDP */
.macro .ENDP name
.cfi_endproc
.endfunc
.endm
#define ENDFUNC .ENDP
/* MASM compatible PUBLIC */
.macro PUBLIC symbol
@ -269,6 +275,10 @@ code = 1
#define else .else
#define elseif .elseif
#define CR "\r"
#define LF "\n"
#define NUL "\0"
#endif
/* Common definitions for FPO macro