1 /* ---------------------------------------------- */
4 /* ---------------------------------------------- */
5 #ifndef TCC_TARGET_X86_64
6 /* ---------------------------------------------- */
11 xchg (%esp),%ebp /* store ebp, get ret.addr */
12 push %ebp /* push ret.addr */
13 lea 4(%esp),%ebp /* setup frame ptr */
14 push %ecx /* save ecx */
27 mov (%eax),%ecx /* restore ecx */
30 /* ---------------------------------------------- */
32 /* ---------------------------------------------- */
37 xchg (%rsp),%rbp /* store ebp, get ret.addr */
38 push %rbp /* push ret.addr */
39 lea 8(%rsp),%rbp /* setup frame ptr */
40 push %rcx /* save ecx */
54 mov (%rax),%rcx /* restore ecx */
57 /* ---------------------------------------------- */
58 /* setjmp/longjmp support */
67 cmp %al,tinyc_no_getbp(%rax)
73 /* ---------------------------------------------- */
75 /* ---------------------------------------------- */
78 /* ---------------------------------------------- */
79 #ifndef TCC_TARGET_X86_64
80 /* ---------------------------------------------- */
84 PEXCEPTION_RECORD exception_record,
85 PEXCEPTION_REGISTRATION registration,
87 PEXCEPTION_REGISTRATION dispatcher
90 int __cdecl _XcptFilter(
91 unsigned long xcptnum,
92 PEXCEPTION_POINTERS pxcptinfoptrs
97 void *exception_pointers; // 1
100 void *scopetable; // 4
105 // this is what the assembler code below means:
110 __except (_XcptFilter(GetExceptionCode(), GetExceptionInformation()))
112 exit(GetExceptionCode());
116 .globl _exception_info
118 mov 1*4-24(%ebp),%eax
121 .globl _exception_code
138 mov 0*4-24(%ebp),%esp
143 // msvcrt wants scopetables aligned and in read-only segment (using .text)
164 // void *exception_pointers;
173 mov $ seh_handler,%eax
177 mov $ seh_scopetable,%eax
191 /* ---------------------------------------------- */
193 /* ---------------------------------------------- */
195 /* SEH on x86-64 not implemented */
197 /* ---------------------------------------------- */
199 /* ---------------------------------------------- */