mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-08 13:29:54 +00:00
Slightly optimize stack save code for calls to long long functions.
The X register is not used as part of the return value, so it does not have to be preserved.
This commit is contained in:
parent
75234dbf83
commit
f41cd241f8
12
Gen.pas
12
Gen.pas
@ -4716,11 +4716,13 @@ procedure GenTree {op: icptr};
|
||||
end {if}
|
||||
else if saveStack or (op^.q <> 0) then begin
|
||||
stackSaveDepth := stackSaveDepth - 1;
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord]) then
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord,cgQuad,cgUQuad])
|
||||
then
|
||||
GenImplied(m_txy);
|
||||
GenNative(m_ldx_dir, direct, stackLoc, nil, 0);
|
||||
GenImplied(m_txs);
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord]) then
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord,cgQuad,cgUQuad])
|
||||
then
|
||||
GenImplied(m_tyx);
|
||||
if stackSaveDepth <> 0 then begin
|
||||
GenImplied(m_ply);
|
||||
@ -4808,11 +4810,13 @@ procedure GenTree {op: icptr};
|
||||
end {if}
|
||||
else if saveStack or (op^.q <> 0) then begin
|
||||
stackSaveDepth := stackSaveDepth - 1;
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord]) then
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord,cgQuad,cgUQuad])
|
||||
then
|
||||
GenImplied(m_txy);
|
||||
GenNative(m_ldx_dir, direct, stackLoc, nil, 0);
|
||||
GenImplied(m_txs);
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord]) then
|
||||
if not (op^.optype in [cgVoid,cgByte,cgUByte,cgWord,cgUWord,cgQuad,cgUQuad])
|
||||
then
|
||||
GenImplied(m_tyx);
|
||||
if stackSaveDepth <> 0 then begin
|
||||
GenImplied(m_ply);
|
||||
|
Loading…
Reference in New Issue
Block a user