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 go1.19.4 darwin/arm64
Yes
go env
$ go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/dadrian/Library/Caches/go-build" GOENV="/Users/dadrian/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/dadrian/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/dadrian/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/opt/homebrew/Cellar/go/1.19.4/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/opt/homebrew/Cellar/go/1.19.4/libexec/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.19.4" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/dadrian/src/github.com/dadrian/go-bugs/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/7_/yc9s7tp94lq83r7fmlncg58c0000gn/T/go-build2852821403=/tmp/go-build -gno-record-gcc-switches -fno-common"
Compiled Go assembly for arm that uses a rotation right shift with the @> syntax.
ADD R0@>16, ZR, R0
I pushed a minimal test case here: https://github.com/dadrian/go-bugs/tree/main/arm-ror
Successful compilation
asm: unsupported shift operator: 00016 (/Users/dadrian/src/github.com/dadrian/go-bugs/arm-ror/function_arm64.s:3) ADDR0@>16, ZR, R0
The text was updated successfully, but these errors were encountered:
@dadrian is ROR a valid shift type for ADD?
If I look at the ADD docs I see
Is the optional shift type to be applied to the second source operand, defaulting to LSL, and can be one of LSL, LSR, or ASR.
whereas if I look at, for example, EOR I see
Is the optional shift to be applied to the final source, defaulting to LSL, and can be one of LSL, LSR, ASR, or ROR.
(I'm an arm64 newbie so maybe I'm mistaken.)
Sorry, something went wrong.
I actually first ran into this on an EOR and dumbed it down to ADD for the repro. You're absolutely correct.
EOR
ADD
That being said, it does work on EOR but only on the first argument, not the second. Not sure if that's intentional (I'm also an ARM newbie).
it does work on EOR but only on the first argument, not the second.
This is a feature/limitation of the architecture.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Compiled Go assembly for arm that uses a rotation right shift with the @> syntax.
ADD R0@>16, ZR, R0
I pushed a minimal test case here: https://github.com/dadrian/go-bugs/tree/main/arm-ror
What did you expect to see?
Successful compilation
What did you see instead?
The text was updated successfully, but these errors were encountered: