annotate dyncallback/dyncall_callback_x64_masm.asm @ 542:a73a5cd50c19

- fix passing aggregate-by-val on x64/sysv: subaggr classification for aggr *arrays* was wrong (was problematic when there ware exactly 2 8bytes to be classified, potentially be passed via registers)
author Tassilo Philipp
date Mon, 02 May 2022 15:32:41 +0200
parents 71c884e610f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 ; auto-generated by gen-masm.sh
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 .CODE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 DCThunk_size = 24
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
4 DCArgs_size_win64 = 96
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
5 DCArgs_size_sysv = 144
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 DCValue_size = 8
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
7 DCRetRegs_SystemV_size = 32
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 FRAME_arg0_win64 = 48
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 FRAME_arg0_sysv = 16
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 FRAME_return = 8
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11 FRAME_parent = 0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 CTX_thunk = 0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 CTX_handler = 24
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 CTX_userdata = 32
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
15 CTX_aggr_ret_reg = 40
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
16 CTX_pad = 44
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
17 CTX_aggrs_pp = 48
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
18 DCCallback_size = 56
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 dcCallback_x64_sysv PROC
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 OPTION PROLOGUE:NONE, EPILOGUE:NONE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 push RBP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 mov RBP,RSP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23 sub RSP,8*8
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 movsd qword ptr [RSP+8*7],XMM7
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 movsd qword ptr [RSP+8*6],XMM6
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26 movsd qword ptr [RSP+8*5],XMM5
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 movsd qword ptr [RSP+8*4],XMM4
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 movsd qword ptr [RSP+8*3],XMM3
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 movsd qword ptr [RSP+8*2],XMM2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 movsd qword ptr [RSP+8*1],XMM1
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 movsd qword ptr [RSP+8*0],XMM0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 push R9
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 push R8
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 push RCX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 push RDX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 push RSI
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37 push RDI
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
38 mov R8,qword ptr [RAX+CTX_aggrs_pp]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
39 push R8
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
40 mov R8D,dword ptr [RAX+CTX_aggr_ret_reg]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
41 push R8
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42 push 0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 lea RDX,qword ptr [RBP+FRAME_arg0_sysv]
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 push RDX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 mov RSI,RSP
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
46 sub RSP,4*8
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 mov RDI,RAX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 mov RCX,qword ptr [RDI+CTX_userdata]
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 mov RDX,RSP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 call qword ptr [RAX+CTX_handler]
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
51 cmp dword ptr [RSP+48],-2
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
52 je scalar_retval
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
53 mov RAX,qword ptr [RSP+0]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
54 mov RDX,qword ptr [RSP+8]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
55 movsd XMM0,qword ptr [RSP+16]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
56 movsd XMM1,qword ptr [RSP+24]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
57 jmp epilog
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
58 scalar_retval:
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
59 mov RAX,qword ptr [RSP+0]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
60 movd XMM0,RAX
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
61 epilog:
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
62 mov RSP,RBP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
63 pop RBP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
64 ret
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
65 dcCallback_x64_sysv ENDP
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
66 dcCallback_x64_win64 PROC FRAME
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
67 OPTION EPILOGUE:NONE
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
68 push RBP
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
69 .pushreg RBP
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
70 mov RBP,RSP
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
71 .setframe RBP, 0
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
72 .endprolog
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
73 sub RSP,4*8
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
74 movsd qword ptr [RSP+8*3],XMM3
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
75 movsd qword ptr [RSP+8*2],XMM2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
76 movsd qword ptr [RSP+8*1],XMM1
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
77 movsd qword ptr [RSP+8*0],XMM0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
78 push R9
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
79 push R8
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
80 push RDX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
81 push RCX
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
82 mov R8,qword ptr [RAX+CTX_aggrs_pp]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
83 push R8
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
84 mov R8D,dword ptr [RAX+CTX_aggr_ret_reg]
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
85 push R8
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
86 push 0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
87 lea RDX,qword ptr [RBP+FRAME_arg0_win64]
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
88 push RDX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
89 mov RDX,RSP
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
90 sub RSP,2*8
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
91 mov RCX,RAX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
92 mov R9,qword ptr [RAX+CTX_userdata]
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
93 mov R8,RSP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
94 sub RSP,4*8
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
95 call qword ptr [RAX+CTX_handler]
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 0
diff changeset
96 mov RAX,qword ptr [RSP+4*8]
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
97 movd XMM0,RAX
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
98 mov RSP,RBP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
99 pop RBP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
100 ret
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
101 dcCallback_x64_win64 ENDP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
102 END