We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
$ go version go version go1.18 darwin/arm64
This is the latest release.
go env
$ go env GO111MODULE="" GOARCH="arm64" GOBIN="/Users/eric/gopath/bin" GOCACHE="/Users/eric/Library/Caches/go-build" GOENV="/Users/eric/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/eric/gopath/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/eric/gopath" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.18" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/eric/git/polyval/go.mod" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2f/2_yz21b92h94_pvr2m00gzh80000gn/T/go-build2162191990=/tmp/go-build -gno-record-gcc-switches -fno-common"
Wrote an assembly program with MOVK $(33825<<48), R5.
MOVK $(33825<<48), R5
(The instruction was taken from Clang generating movk x5, #33825, lsl #48.)
movk x5, #33825, lsl #48
It compile.
asm: requires uimm16 00096 (/Users/eric/git/polyval/polyval_arm64.s:451) MOVK $-8925852986471612416, R5 asm: assembly failed
The text was updated successfully, but these errors were encountered:
The MOVK instruction was part of the hand-written sequence:
MOVK
MOVD $8456, R5 MOVK $(4228<<16), R5 MOVK $(2114<<32), R5 MOVK $(33825<<48), R5
Interestingly, when I replace those instructions with
MOVD $0x8421084210842108, R5
the compiler actually emits the instruction that cmd/asm rejects:
cmd/asm
$ go tool objdump -gnu -s ctmulAsm ./polyval.test MOVD $8456, R5 // mov x5, #0x2108 MOVK $(4228<<16), R5 // movk x5, #0x1084, lsl #16 MOVK $(2114<<32), R5 // movk x5, #0x842, lsl #32 MOVK $(33825<<48), R5 // movk x5, #0x8421, lsl #48
Sorry, something went wrong.
Change https://go.dev/cl/399455 mentions this issue: cmd/asm: fix MOVK when constant has high bit set
cmd/asm: fix MOVK when constant has high bit set
a6f6932
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This is the latest release.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Wrote an assembly program with
MOVK $(33825<<48), R5
.(The instruction was taken from Clang generating
movk x5, #33825, lsl #48
.)What did you expect to see?
It compile.
What did you see instead?
The text was updated successfully, but these errors were encountered: