File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ function astLoadCALL( byval n as ASTNODE ptr ) as IRVREG ptr
231231 if ( symbProcReturnsOnStack( proc ) ) then
232232 '' Pop hidden ptr if cdecl and target doesn't want the callee
233233 '' to do it, despite it being cdecl.
234- if ( (symbGetProcMode( proc ) = FB_FUNCMODE_CDECL) and _
234+ if ( (( symbGetProcMode( proc ) = FB_FUNCMODE_CDECL) or (symbGetProcMode( proc ) = FB_FUNCMODE_THISCALL) ) and _
235235 ((env.target.options and FB_TARGETOPT_CALLEEPOPSHIDDENPTR) = 0 ) ) then
236236 bytestopop += env.pointersize
237237 end if
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ end function
160160'' Calculate the number of bytes the procedure needs to pop from stack when returning
161161function symbProcCalcBytesToPop( byval proc as FBSYMBOL ptr ) as longint
162162 dim as longint bytestopop = 0
163- var notcdecl = (symbGetProcMode( proc ) <> FB_FUNCMODE_CDECL)
163+ var notcdecl = (symbGetProcMode( proc ) <> FB_FUNCMODE_CDECL) and (symbGetProcMode( proc ) <> FB_FUNCMODE_THISCALL)
164164
165165 '' Need to pop parameters in case of stdcall/pascal, but not for cdecl
166166 if ( notcdecl ) then
You can’t perform that action at this time.
0 commit comments