Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
clobberdead.go36 linesDownload Raw Back to codegen
1// asmcheck -gcflags=-clobberdead2 3//go:build amd64 || arm644 5// Copyright 2021 The Go Authors. All rights reserved.6// Use of this source code is governed by a BSD-style7// license that can be found in the LICENSE file.8 9package codegen10 11type T [2]*int // contain pointer, not SSA-able (so locals are not registerized)12 13var p1, p2, p3 T14 15func F() {16	// 3735936685 is 0xdeaddead. On ARM64 R27 is REGTMP.17	// clobber x, y at entry. not clobber z (stack object).18	// amd64:`MOVL \$3735936685, command-line-arguments\.x`, `MOVL \$3735936685, command-line-arguments\.y`, -`MOVL \$3735936685, command-line-arguments\.z`19	// arm64:`MOVW R27, command-line-arguments\.x`, `MOVW R27, command-line-arguments\.y`, -`MOVW R27, command-line-arguments\.z`20	x, y, z := p1, p2, p321	addrTaken(&z)22	// x is dead at the call (the value of x is loaded before the CALL), y is not23	// amd64:`MOVL \$3735936685, command-line-arguments\.x`, -`MOVL \$3735936685, command-line-arguments\.y`24	// arm64:`MOVW R27, command-line-arguments\.x`, -`MOVW R27, command-line-arguments\.y`25	use(x)26	// amd64:`MOVL \$3735936685, command-line-arguments\.x`, `MOVL \$3735936685, command-line-arguments\.y`27	// arm64:`MOVW R27, command-line-arguments\.x`, `MOVW R27, command-line-arguments\.y`28	use(y)29}30 31//go:noinline32func use(T) {}33 34//go:noinline35func addrTaken(*T) {}36 
codekingpro/portable-devtools · Team Ai