Mercurial > pub > dyncall > dyncall
comparison dyncallback/dyncall_callback_x64.S @ 540:951cbfb5020a
- fixed wrong symbol naming on some platforms
author | Tassilo Philipp |
---|---|
date | Sun, 24 Apr 2022 13:59:26 +0200 |
parents | 71c884e610f0 |
children |
comparison
equal
deleted
inserted
replaced
539:0c3f5355769d | 540:951cbfb5020a |
---|---|
109 | 109 |
110 /* get info about return type, use to select how to store reg-based retval */ | 110 /* get info about return type, use to select how to store reg-based retval */ |
111 CMPL(LIT(-2/*see C*/), DWORD(RSP, 48)) /* rsp+48 = where r8 (aggr_return_register) was pushed */ | 111 CMPL(LIT(-2/*see C*/), DWORD(RSP, 48)) /* rsp+48 = where r8 (aggr_return_register) was pushed */ |
112 | 112 |
113 /* if retval is small aggregate via regs */ | 113 /* if retval is small aggregate via regs */ |
114 JE(scalar_retval) | 114 JE(CSYM(scalar_retval)) |
115 | 115 |
116 MOV(QWORD(RSP,0),RAX) | 116 MOV(QWORD(RSP,0),RAX) |
117 MOV(QWORD(RSP,8),RDX) | 117 MOV(QWORD(RSP,8),RDX) |
118 MOVSD(QWORD(RSP,16),XMM0) /* @@@AGGR needed to be put in xmm in this case? @@@ also not what doc/appendix says, actually */ | 118 MOVSD(QWORD(RSP,16),XMM0) /* @@@AGGR needed to be put in xmm in this case? @@@ also not what doc/appendix says, actually */ |
119 MOVSD(QWORD(RSP,24),XMM1) /* @@@AGGR needed to be put in xmm in this case? @@@ also not what doc/appendix says, actually */ | 119 MOVSD(QWORD(RSP,24),XMM1) /* @@@AGGR needed to be put in xmm in this case? @@@ also not what doc/appendix says, actually */ |
120 | 120 |
121 /* else (retval is int, float, or ptr to aggregate) */ | 121 /* else (retval is int, float, or ptr to aggregate) */ |
122 JMP(epilog) | 122 JMP(CSYM(epilog)) |
123 CSYM(scalar_retval): | 123 CSYM(scalar_retval): |
124 | 124 |
125 /* pass return type via registers, handle ints and floats */ | 125 /* pass return type via registers, handle ints and floats */ |
126 MOV(QWORD(RSP,0),RAX) | 126 MOV(QWORD(RSP,0),RAX) |
127 MOVD(RAX,XMM0) | 127 MOVD(RAX,XMM0) |