[go] internal/runtime/sys: improve DIT assembly

0 views
Skip to first unread message

Roland Shoemaker (Gerrit)

unread,
Feb 24, 2026, 11:50:26 AM (16 hours ago) Feb 24
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Keith Randall, Keith Randall, Go LUCI, Austin Clements, Gopher Robot, golang-co...@googlegroups.com

Roland Shoemaker submitted the change

Change information

Commit message:
internal/runtime/sys: improve DIT assembly

In EnableDIT, if DIT is already enabled, return early instead of
executing MSR and DSB/ISB, since they are not particularly cheap
instructions.

Also, if we have support for the SB (Speculation Barrier) instruction,
use it instead of DSB+ISB when enabling DIT, since SB is cheaper.
Change-Id: I1b3ecbd95ed42bfd10d646125704abf4e80b6d2e
Reviewed-by: Keith Randall <k...@google.com>
Reviewed-by: Keith Randall <k...@golang.org>
Files:
  • M src/internal/runtime/sys/dit_arm64.go
  • M src/internal/runtime/sys/dit_arm64.s
Change size: S
Delta: 2 files changed, 11 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Keith Randall, +1 by Keith Randall
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I1b3ecbd95ed42bfd10d646125704abf4e80b6d2e
Gerrit-Change-Number: 729800
Gerrit-PatchSet: 8
Gerrit-Owner: Roland Shoemaker <rol...@golang.org>
Gerrit-Reviewer: Austin Clements <aus...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages