]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
powerpc: micro-optimize cpu_switch()
authorJustin Hibbits <jhibbits@FreeBSD.org>
Sat, 27 Apr 2019 00:53:41 +0000 (00:53 +0000)
committerJustin Hibbits <jhibbits@FreeBSD.org>
Sat, 27 Apr 2019 00:53:41 +0000 (00:53 +0000)
commit19cfd8759e893bccaac874d5f926857f74bc445f
treeb5e73bc9c449f3abc19b36ef53134c6bfb6f071d
parente430d1ed78d021db4e9760d9800393b627156745
powerpc: micro-optimize cpu_switch()

Since the non-volatile registers are restored at the end of cpu_switchin (of
the new thread) they're free for us to use for our own purposes.  Load the
PCB_FLAGS into a non-volatile register so it's preserved across the C
function calls that manage FPU and altivec state.  This removes 4 loads from
each file.  Might be a trivial performance improvement (~12 clock cycles per
context switch).

MFC after: 3 weeks
sys/powerpc/powerpc/swtch32.S
sys/powerpc/powerpc/swtch64.S