You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As return values and arguments share the same register (r0), attempting to make a call to another function where the return value is in another position other than the first one causes that argument to get corrupted.
For example:
%call function @foo, @ret will first clobber @ret (aka r0) with @foo, then attempt to put the clobbered value of r0 into r1.
Instead, %call should push the arguments to the stack and then pop them into registers. This is far less efficient, but we're not worried about efficiency in this stage.
This could potentially simplify some argument handling in bootstrap4/compiler0 as well.
The text was updated successfully, but these errors were encountered:
As return values and arguments share the same register (r0), attempting to make a call to another function where the return value is in another position other than the first one causes that argument to get corrupted.
For example:
%call function @foo, @ret
will first clobber@ret
(akar0
) with@foo
, then attempt to put the clobbered value ofr0
intor1
.Instead,
%call
should push the arguments to the stack and then pop them into registers. This is far less efficient, but we're not worried about efficiency in this stage.This could potentially simplify some argument handling in
bootstrap4
/compiler0
as well.The text was updated successfully, but these errors were encountered: