X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/blobdiff_plain/28321c96c5c2ea4ee8d9a2b48ad5b63499029d5b..f71dd54d995dcffeb73fb41132a60b6ae62d2ea3:/base/asm-common.h diff --git a/base/asm-common.h b/base/asm-common.h index 0b5f2238..0d32ccf9 100644 --- a/base/asm-common.h +++ b/base/asm-common.h @@ -100,6 +100,14 @@ name: // Set the function hooks. #define FUNC_PREHOOK(_) .balign 16 +// On Windows, arrange to install stack-unwinding data. +#if CPUFAM_AMD64 && ABI_WIN +# define FUNC_POSTHOOK(name) .seh_proc name +# define ENDFUNC_HOOK(_) .seh_endproc +// Procedures are expected to invoke `.seh_setframe' if necessary, and +// `.seh_pushreg' and friends, and `.seh_endprologue'. +#endif + // Don't use the wretched AT&T syntax. It's festooned with pointless // punctuation, and all of the data movement is backwards. Ugh! .intel_syntax noprefix