.macro ESP_PROLOG_BEG
.endm
+.macro ESP_PROLOG_PUSH Reg
+ PROLOG_PUSH \Reg
+.endm
+
+.macro ESP_PROLOG_ALLOC Size
+ sub esp, \Size
+ .cfi_adjust_cfa_offset \Size
+.endm
+
.macro ESP_PROLOG_END
+ .cfi_def_cfa_register esp
.endm
.macro ESP_EPILOG_BEG
.endm
+.macro ESP_EPILOG_POP Reg
+ EPILOG_POP \Reg
+.endm
+
+.macro ESP_EPILOG_FREE Size
+ add esp, \Size
+ .cfi_adjust_cfa_offset -\Size
+.endm
+
.macro ESP_EPILOG_END
.endm
NESTED_ENTRY CallEHFunclet, _TEXT, NoHandler
ESP_PROLOG_BEG
- PROLOG_PUSH ebp
- mov ebp, esp
- PROLOG_PUSH ebx
- PROLOG_PUSH esi
- PROLOG_PUSH edi
+ ESP_PROLOG_PUSH ebp
+ ESP_PROLOG_PUSH ebx
+ ESP_PROLOG_PUSH esi
+ ESP_PROLOG_PUSH edi
+ ESP_PROLOG_ALLOC 12
ESP_PROLOG_END
+ lea ebp, [esp + 3*4 + 12]
+
// On entry:
//
// [ebp+ 8] = throwable
call edx
ESP_EPILOG_BEG
- EPILOG_POP edi
- EPILOG_POP esi
- EPILOG_POP ebx
- EPILOG_POP ebp
+ ESP_EPILOG_FREE 12
+ ESP_EPILOG_POP edi
+ ESP_EPILOG_POP esi
+ ESP_EPILOG_POP ebx
+ ESP_EPILOG_POP ebp
ESP_EPILOG_END
ret 16
NESTED_ENTRY CallEHFilterFunclet, _TEXT, NoHandler
ESP_PROLOG_BEG
- PROLOG_PUSH ebp
- mov ebp, esp
- PROLOG_PUSH ebx
- PROLOG_PUSH esi
- PROLOG_PUSH edi
+ ESP_PROLOG_PUSH ebp
+ ESP_PROLOG_PUSH ebx
+ ESP_PROLOG_PUSH esi
+ ESP_PROLOG_PUSH edi
+ ESP_PROLOG_ALLOC 12
ESP_PROLOG_END
+ lea ebp, [esp + 3*4 + 12]
+
// On entry:
//
// [ebp+ 8] = throwable
call edx
ESP_EPILOG_BEG
- EPILOG_POP edi
- EPILOG_POP esi
- EPILOG_POP ebx
- EPILOG_POP ebp
+ ESP_EPILOG_FREE 12
+ ESP_EPILOG_POP edi
+ ESP_EPILOG_POP esi
+ ESP_EPILOG_POP ebx
+ ESP_EPILOG_POP ebp
ESP_EPILOG_END
ret 16
NESTED_END CallEHFunclet, _TEXT
-