// 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