]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: clean up copyin/copyout
authormjg <mjg@FreeBSD.org>
Thu, 27 Sep 2018 15:24:16 +0000 (15:24 +0000)
committermjg <mjg@FreeBSD.org>
Thu, 27 Sep 2018 15:24:16 +0000 (15:24 +0000)
commitf4f40b7c3e1aad476eaefd8b0658bea0668b3f1b
treeda96f4ba7df137f797b16308b60949fd6a49115f
parent6502337973a5c9c8bcd168a54fa5f49f87ff7c4f
amd64: clean up copyin/copyout

- move the PSL.AC comment to the fault handler
- stop testing for zero-sized ops. after several minutes of package
building there were no copyin calls with zero bytes and very few
copyout. the semantic of returning 0 in this case is preserved
- shorten exit paths by clearing %eax earlier
- replace xchg with 3 movs. this is what compilers do. a naive
benchmark on EPYC suggests about 1% increase in thoughput thanks to
this change.
- remove the useless movb %cl,%al from copyout. it looks like a
leftover from many years ago

Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17286
sys/amd64/amd64/support.S