ReactOS 0.4.16-dev-329-g9223134
pseh2_64.h File Reference

Go to the source code of this file.

Macros

#define STRINGIFY(a)   #a
 
#define EMIT_PRAGMA_(params)    _Pragma( STRINGIFY(params) )
 
#define EMIT_PRAGMA(type, line)    EMIT_PRAGMA_(REACTOS seh(type,line))
 
#define _SEH3
 
#define _SEH3   $_EMIT_DEFS_AND_PRAGMA_(Line, Type) _SEH3$_EMIT_DEFS_AND_PRAGMA__(Line, Type)
 
#define _SEH3   $_EMIT_DEFS_AND_PRAGMA(Type) _SEH3$_EMIT_DEFS_AND_PRAGMA_(__LINE__, Type)
 
#define _SEH2_TRY
 
#define _SEH2_EXCEPT(...)
 
#define _SEH2_FINALLY
 
#define _SEH2_END
 
#define _SEH2_GetExceptionInformation()   __seh2$$exception_ptr__
 
#define _SEH2_GetExceptionCode()   __seh2$$exception_code__
 
#define _SEH2_AbnormalTermination()   __seh2$$abnormal_termination__
 
#define _SEH2_LEAVE   goto __seh2$$leave_scope__
 
#define _SEH2_YIELD(__stmt)   __stmt
 
#define _SEH2_VOLATILE   volatile
 
#define __try   _SEH2_TRY
 
#define __except   _SEH2_EXCEPT
 
#define __finally   _SEH2_FINALLY
 
#define __endtry   _SEH2_END
 
#define __leave   goto __seh2$$leave_scope__
 
#define _exception_info()   __seh2$$exception_ptr__
 
#define _exception_code()   __seh2$$exception_code__
 
#define _abnormal_termination()   __seh2$$abnormal_termination__
 

Functions

 __asm__ (".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
 

Macro Definition Documentation

◆ __endtry

#define __endtry   _SEH2_END

Definition at line 175 of file pseh2_64.h.

◆ __except

#define __except   _SEH2_EXCEPT

Definition at line 173 of file pseh2_64.h.

◆ __finally

#define __finally   _SEH2_FINALLY

Definition at line 174 of file pseh2_64.h.

◆ __leave

#define __leave   goto __seh2$$leave_scope__

Definition at line 176 of file pseh2_64.h.

◆ __try

#define __try   _SEH2_TRY

Definition at line 172 of file pseh2_64.h.

◆ _abnormal_termination

#define _abnormal_termination ( )    __seh2$$abnormal_termination__

Definition at line 179 of file pseh2_64.h.

◆ _exception_code

#define _exception_code ( )    __seh2$$exception_code__

Definition at line 178 of file pseh2_64.h.

◆ _exception_info

#define _exception_info ( )    __seh2$$exception_ptr__

Definition at line 177 of file pseh2_64.h.

◆ _SEH2_AbnormalTermination

#define _SEH2_AbnormalTermination ( )    __seh2$$abnormal_termination__

Definition at line 166 of file pseh2_64.h.

◆ _SEH2_END

#define _SEH2_END
Value:
__seh2$$leave_scope__: __MINGW_ATTRIB_UNUSED; \
if (__seh2$$abnormal_termination__) \
{ \
__asm__("jmp __seh2_global_filter_func_exit"); \
} \
} \
}
#define __MINGW_ATTRIB_UNUSED
Definition: _mingw.h:124

Definition at line 155 of file pseh2_64.h.

◆ _SEH2_EXCEPT

#define _SEH2_EXCEPT (   ...)

Definition at line 66 of file pseh2_64.h.

◆ _SEH2_FINALLY

#define _SEH2_FINALLY

Definition at line 114 of file pseh2_64.h.

◆ _SEH2_GetExceptionCode

#define _SEH2_GetExceptionCode ( )    __seh2$$exception_code__

Definition at line 165 of file pseh2_64.h.

◆ _SEH2_GetExceptionInformation

#define _SEH2_GetExceptionInformation ( )    __seh2$$exception_ptr__

Definition at line 164 of file pseh2_64.h.

◆ _SEH2_LEAVE

#define _SEH2_LEAVE   goto __seh2$$leave_scope__

Definition at line 167 of file pseh2_64.h.

◆ _SEH2_TRY

#define _SEH2_TRY
Value:
{ \
__label__ __seh2$$filter__; \
__label__ __seh2$$begin_except__; \
__label__ __seh2$$begin_try__; \
__label__ __seh2$$end_try__; \
/* \
* We close the current SEH block for this function and install our own. \
* At this point GCC emitted its prologue, and if it saves more \
* registers, the relevant instruction will be valid for our scope as well. \
* We also count the number of try blocks at assembly level \
* to properly set the handler data when we're done. \
*/ \
__seh2$$begin_try__: \
{ \
__label__ __seh2$$leave_scope__;

Definition at line 55 of file pseh2_64.h.

◆ _SEH2_VOLATILE

#define _SEH2_VOLATILE   volatile

Definition at line 169 of file pseh2_64.h.

◆ _SEH2_YIELD

#define _SEH2_YIELD (   __stmt)    __stmt

Definition at line 168 of file pseh2_64.h.

◆ _SEH3 [1/3]

#define _SEH3
Value:
$_EMIT_DEFS_AND_PRAGMA__(Line, Type) \
/* Emit assembler constants with line number to be individual */ \
__asm__ __volatile__ goto ("\n" \
"\t__seh2$$begin_try__" #Line "=%l0\n" /* Begin of tried code */ \
"\t__seh2$$end_try__" #Line "=%l1 + 1\n" /* End of tried code */ \
"\t__seh2$$filter__" #Line "=%l2\n" /* Filter function */ \
"\t__seh2$$begin_except__" #Line "=%l3\n" /* Called on except */ \
: /* No output */ \
: /* No input */ \
: /* No clobber */ \
: __seh2$$begin_try__, \
__seh2$$end_try__, \
__seh2$$filter__, \
__seh2$$begin_except__); \
/* Call our home-made pragma */ \
EMIT_PRAGMA(Type,Line)
Type
Definition: Type.h:7
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
Definition: ncftp.h:79

Definition at line 53 of file pseh2_64.h.

◆ _SEH3 [2/3]

#define _SEH3   $_EMIT_DEFS_AND_PRAGMA_(Line, Type) _SEH3$_EMIT_DEFS_AND_PRAGMA__(Line, Type)

Definition at line 53 of file pseh2_64.h.

◆ _SEH3 [3/3]

#define _SEH3   $_EMIT_DEFS_AND_PRAGMA(Type) _SEH3$_EMIT_DEFS_AND_PRAGMA_(__LINE__, Type)

Definition at line 53 of file pseh2_64.h.

◆ EMIT_PRAGMA

#define EMIT_PRAGMA (   type,
  line 
)     EMIT_PRAGMA_(REACTOS seh(type,line))

Definition at line 32 of file pseh2_64.h.

◆ EMIT_PRAGMA_

#define EMIT_PRAGMA_ (   params)     _Pragma( STRINGIFY(params) )

Definition at line 30 of file pseh2_64.h.

◆ STRINGIFY

#define STRINGIFY (   a)    #a

Definition at line 29 of file pseh2_64.h.

Function Documentation

◆ __asm__()

__asm__ ( ".p2align  4,
0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %  rbp,
%rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub  $32,
%rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %  rax,
%rdx\n" "\tmov %  rdx,
%rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd  $32,
%rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc"   
)

Referenced by __addfsbyte(), __addfsdword(), __addfsword(), __break(), __cpuid(), __cpuidex(), __debugbreak(), __declspec(), __DestructExceptionObject(), __emul(), __emulu(), __fp_unordered_compare(), __fpclassify(), __fpclassifyf(), __fpclassifyl(), __halt(), __inbyte(), __inbytestring(), __incfsbyte(), __incfsdword(), __incfsword(), __indword(), __indwordstring(), __int2c(), __invlpg(), __inword(), __inwordstring(), __isnan(), __isnanf(), __isnanl(), __lidt(), __ll_lshift(), __ll_rshift(), __movsb(), __movsd(), __movsw(), __nop(), __outbyte(), __outbytestring(), __outdword(), __outdwordstring(), __outword(), __outwordstring(), __rdtsc(), __readcr0(), __readcr2(), __readcr3(), __readcr4(), __readdr(), __readeflags(), __readfsbyte(), __readfsdword(), __readfsword(), __readmsr(), __readpmc(), __readsdr1(), __segmentlimit(), __sidt(), __signbit(), __signbitf(), __signbitl(), __stack_chk_fail(), __stosb(), __stosd(), __stosw(), __ud2(), __ull_rshift(), __wbinvd(), __writecr0(), __writecr3(), __writecr4(), __writedr(), __writeeflags(), __writefsbyte(), __writefsdword(), __writefsword(), __writemsr(), __writesdr1(), __yield(), _BitScanForward(), _BitScanReverse(), _bittest(), _bittestandcomplement(), _bittestandreset(), _bittestandset(), _byteswap_uint64(), _byteswap_ulong(), _byteswap_ushort(), _clearfp(), _control87(), _disable(), _enable(), _fpreset(), _InterlockedAddLargeStatistic(), _interlockedbittestandreset(), _interlockedbittestandset(), _InterlockedCompareExchange(), _InterlockedCompareExchange16(), _InterlockedCompareExchange64(), _InterlockedCompareExchange8(), _InterlockedCompareExchangePointer(), _InterlockedExchange(), _InterlockedExchange16(), _InterlockedExchange8(), _InterlockedExchangeAdd(), _InterlockedExchangeAdd16(), _InterlockedExchangeAdd8(), _InterlockedExchangePointer(), _lrintf(), _lrotl(), _lrotr(), _mm256_zeroupper(), _mm_lfence(), _mm_mfence(), _mm_pause(), _rdrand16_step(), _rdrand32_step(), _rdseed16_step(), _rdseed32_step(), _ReadWriteBarrier(), _rotl(), _rotl16(), _rotl8(), _rotr(), _rotr16(), _rotr8(), _SEH2Except(), _SEH2Finally(), _SEH2GlobalUnwind(), _sgdt(), _statusfp(), ArchTrapNoProcess(), atomic_add(), atomic_add_negative(), atomic_dec(), atomic_dec_and_test(), atomic_inc(), atomic_inc_and_test(), atomic_sub(), atomic_sub_and_test(), BlpArchInitialize(), call_test(), d3d_fpu_setup(), DIB_16BPP_ColorFill(), DIB_16BPP_HLine(), DIB_24BPP_ColorFill(), get_native_fpcw(), HalSweepDcache(), KeArmCacheRegisterGet(), KeArmControlRegisterGet(), KeArmControlRegisterSet(), KeArmDomainRegisterSet(), KeArmFaultAddressRegisterGet(), KeArmFaultStatusRegisterGet(), KeArmFlushIcache(), KeArmFlushTlb(), KeArmHaltProcessor(), KeArmIdCodeRegisterGet(), KeArmInstructionFaultStatusRegisterGet(), KeArmInvalidateAllCaches(), KeArmInvalidateTlbEntry(), KeArmLockdownRegisterGet(), KeArmLockdownRegisterSet(), KeArmStatusRegisterGet(), KeArmTranslationTableRegisterGet(), KeArmTranslationTableRegisterSet(), KeArmWaitForInterrupt(), KeGetCurrentProcessorNumber(), KeMemoryBarrier(), KiIret(), KiIsNpxErrataPresent(), KiSwitchToBootStack(), llrint(), llrintf(), llrintl(), logb(), logbf(), logbl(), lrint(), lrintf(), lrintl(), main(), NmiClearFlag(), NtCurrentTeb(), rint(), rintf(), rintl(), RtlUlongByteSwap(), RtlWalkFrameChain(), set_fpu_control_word(), set_native_fpcw(), setup_fpu(), TestSSEExceptions(), VarCyFromR8(), wined3d_pause(), ZSTD_compressBlock_lazy_extDict_generic(), ZSTD_compressBlock_lazy_generic(), and ZSTD_cpuid().