Skip to content

Commit f50cb88

Browse files
committed
After a fn call, insert moves before resetting the stack pointer
1 parent 4821663 commit f50cb88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/selectgen.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -757,10 +757,10 @@ method insert_move_args env arg loc stacksize =
757757
self#insert_moves env arg loc
758758

759759
method insert_move_results env loc res stacksize =
760+
self#insert_moves env loc res;
760761
if stacksize <> 0 then begin
761762
self#insert env (Iop(Istackoffset(-stacksize))) [||] [||]
762-
end;
763-
self#insert_moves env loc res
763+
end
764764

765765
(* Add an Iop opcode. Can be overridden by processor description
766766
to insert moves before and after the operation, i.e. for two-address

0 commit comments

Comments
 (0)