]> Cypherpunks repositories - gostls13.git/commit
runtime: refactor ARM VDSO call setup to helper
authorMichael Pratt <mpratt@google.com>
Thu, 4 Nov 2021 21:21:13 +0000 (17:21 -0400)
committerMichael Pratt <mpratt@google.com>
Wed, 17 Aug 2022 20:02:39 +0000 (20:02 +0000)
commit876d477b0e3b27ae136a7e8dfceaf0ec72bddea6
tree072086591c4b798b11ca78b95f91d4347f8e1ca7
parentc7f870ebc41029e07e7ffd8ff2d96b91fd83cd40
runtime: refactor ARM VDSO call setup to helper

We have a very complex process to make VDSO calls on ARM. Create a
wrapper helper function which reduces duplication and allows for
additional calls from other packages.

vdsoCall has a few differences from the original code in
walltime/nanotime:

* It does not use R0-R3, as they are passed through as arguments to fn.
* It does not save g if g.m.gsignal.stack.lo is zero. This may occur if
it called at startup on g0 between assigning g0.m.gsignal and setting
its stack.

For #49182

Change-Id: I51aca514b4835b71142011341d2f09125334d30f
Reviewed-on: https://go-review.googlesource.com/c/go/+/362795
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/os_linux_arm.go
src/runtime/sys_linux_arm.s