callback: Properly handle calls with return pointers and simplify interface

This commit is contained in:
MerryMage 2018-02-09 15:58:16 +00:00
parent 15871910af
commit ad428cbd7a
5 changed files with 86 additions and 128 deletions

View file

@ -152,9 +152,9 @@ void BlockOfCode::GenRunCode() {
SwitchMxcsrOnExit();
}
cb.AddTicks->EmitCall(*this, [this](Xbyak::Reg64 param1) {
mov(param1, qword[r15 + jsi.offsetof_cycles_to_run]);
sub(param1, qword[r15 + jsi.offsetof_cycles_remaining]);
cb.AddTicks->EmitCall(*this, [this](RegList param) {
mov(param[0], qword[r15 + jsi.offsetof_cycles_to_run]);
sub(param[0], qword[r15 + jsi.offsetof_cycles_remaining]);
});
ABI_PopCalleeSaveRegistersAndAdjustStack(*this);