Page MenuHomeFreeBSD

Optimize set_syscall_retval for arm64
ClosedPublic

Authored by trasz on Oct 28 2020, 7:44 PM.
Tags
None
Referenced Files
F123168880: D26991.id.diff
Fri, Jul 11, 8:00 PM
Unknown Object (File)
Wed, Jun 25, 12:07 PM
Unknown Object (File)
Tue, Jun 17, 3:03 AM
Unknown Object (File)
Mon, Jun 16, 2:38 AM
Unknown Object (File)
Jun 11 2025, 3:15 AM
Unknown Object (File)
Jun 3 2025, 3:41 PM
Unknown Object (File)
May 30 2025, 12:40 PM
Unknown Object (File)
May 9 2025, 11:51 AM

Details

Summary

Optimize set_syscall_retval() for arm64 by predicting the return
value to be zero.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34449
Build 31551: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Oct 28 2020, 7:44 PM

similar to amd64,

if (__predict_true(error == 0)) {
        frame->tf_rax = td->td_retval[0];
        frame->tf_rdx = td->td_retval[1];
        frame->tf_rflags &= ~PSL_C;
        return;
}
emaste added a subscriber: mhorne.

Maybe worth a comment about the microoptimization?

This revision is now accepted and ready to land.Jan 8 2021, 3:37 PM

See also, the analogous commit for riscv: rS367138.

This revision was automatically updated to reflect the committed changes.