summaryrefslogtreecommitdiffhomepage
path: root/src/seh/nt64/ntapi_tt_seh_frame.s
blob: 11e6aefa43dd980715b8551b4b20765262895e5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
##########################################################
##  ntapi: Native API core library                      ##
##  Copyright (C) 2013--2017  Z. Gilboa                 ##
##  Released under GPLv2 and GPLv3; see COPYING.NTAPI.  ##
##########################################################

.section .text

.global __ntapi_tt_seh_frame

	.def __ntapi_tt_seh_frame; .scl 2; .type 32; .endef
	.def __seh_trap;           .scl 2; .type 32; .endef

__seh_trap:
	nop
	jmp __seh_trap

	.seh_proc __ntapi_tt_seh_frame
__ntapi_tt_seh_frame:
	.seh_endprologue

.__init_frame_begin:
	.seh_handler __seh_trap, @except
	.seh_handlerdata
	.long 1
	.long .__init_frame_begin,.__init_frame_end,__seh_trap,.__init_frame_end
	.text

	subq $40, %rsp
	call *%r9
	addq $40, %rsp

	nop
.__init_frame_end:
	ret

	.seh_endproc

	.section .got$__ntapi_tt_seh_frame,"r"
	.global __imp___ntapi_tt_seh_frame
__imp___ntapi_tt_seh_frame:
	.quad	__ntapi_tt_seh_frame
	.linkonce discard