mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:47:53 +02:00
* Fixed safecall on win32 with -Ooregvar by making sure that $safecallresult
is never stored in a register. git-svn-id: trunk@43868 -
This commit is contained in:
parent
fca4d3315b
commit
11784cb76a
@ -355,6 +355,15 @@ implementation
|
||||
{ vo_is_funcret is necessary so the local only gets freed after we loaded its
|
||||
value into the return register }
|
||||
vs:=clocalvarsym.create('$safecallresult',vs_value,search_system_type('HRESULT').typedef,[vo_is_funcret]);
|
||||
{ do not put this variable in a register. The register which will be bound
|
||||
to this symbol will not be allocated automatically. Which means it will
|
||||
be re-used wich breaks the code. Besides this it is questionable if it is
|
||||
an optimization if one of the registers is kept allocated during the complete
|
||||
function, without ever using it.
|
||||
(It would be better to re-write the safecall-support in such a way that this
|
||||
variable it not needed at all, but that the HRESULT is set when the method
|
||||
is finalized) }
|
||||
vs.varregable:=vr_none;
|
||||
pd.localst.insert(vs);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user