aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/x86
diff options
context:
space:
mode:
authorKeith Randall <khr@google.com>2019-01-15 15:00:43 -0800
committerKeith Randall <khr@golang.org>2019-02-26 20:41:14 +0000
commit57976fe2b4cbd44d27e27af510494de0d182e703 (patch)
treea14580932dfe02fe26710d0cd35d5d242f7baf2d /src/cmd/compile/internal/x86
parent5cf4e442a5dc1f4a1d6f3fd04b1083bc192e648e (diff)
downloadgo-57976fe2b4cbd44d27e27af510494de0d182e703.tar.gz
go-57976fe2b4cbd44d27e27af510494de0d182e703.zip
cmd/compile: update comment about x86 nop instruction generator
The comment about losing the high bits is incorrect. We now use these nops in places where they really need to be a nop. (Before inline marks, we used them just before deferreturn calls, so they could clobber any caller-saved values.) Change-Id: I433d1ec455aa37dab8fef6eb7d407f3737dbb97f Reviewed-on: https://go-review.googlesource.com/c/158057 Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
Diffstat (limited to 'src/cmd/compile/internal/x86')
-rw-r--r--src/cmd/compile/internal/x86/ggen.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/x86/ggen.go b/src/cmd/compile/internal/x86/ggen.go
index 1851af57c4..86bb782aab 100644
--- a/src/cmd/compile/internal/x86/ggen.go
+++ b/src/cmd/compile/internal/x86/ggen.go
@@ -54,6 +54,7 @@ func zeroAuto(pp *gc.Progs, n *gc.Node) {
}
func ginsnop(pp *gc.Progs) *obj.Prog {
+ // See comment in ../amd64/ggen.go.
p := pp.Prog(x86.AXCHGL)
p.From.Type = obj.TYPE_REG
p.From.Reg = x86.REG_AX