Page MenuHomeFreeBSD

Reorganise certain arm64 assembly code for efficiency
AbandonedPublic

Authored by dg612_cam.ac.uk on Jan 11 2023, 6:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 4, 9:55 PM
Unknown Object (File)
Tue, Nov 4, 7:08 PM
Unknown Object (File)
Tue, Nov 4, 7:08 PM
Unknown Object (File)
Tue, Nov 4, 4:30 PM
Unknown Object (File)
Mon, Oct 27, 11:02 PM
Unknown Object (File)
Mon, Oct 20, 8:51 AM
Unknown Object (File)
Oct 15 2025, 12:52 AM
Unknown Object (File)
Oct 12 2025, 8:15 AM
Subscribers

Details

Reviewers
manu
andrew
Summary

Group the load/store and msr/mrs instructions together in swtch.S and other places. This may be useful for efficiency.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/arm64/arm64/swtch.S
100–101

Is there a reason you changed this to ldr, ldp and not keep it as ldp, ldr?

sys/arm64/arm64/swtch.S
100–101

This is mostly stylistic. ldr, ldp and ldp, ldr should be equally fine in practice.

sys/arm64/arm64/swtch.S
100–101

Ok, it looks like there is a penalty on some CPUs for non-64bit aligned ldp, however as these are all 64bit aligned it should be ok.

So where does this stand? My arm assembler fu is weak, but I know that at least the pcb.h bits are good. I don't know how to read Andrew's comments on this, though.