You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check assembler assembly instruction "CMPW $0x22220000, RSP", the instruction is encoded as two binary 5b44a4d2 ff031b6b. binary 5b44a4d2 is decoded as MOVD $0x2222000, R27, binary ff031b6b is decoded as CMPW R27, ZR.
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
CMPW $0x2222000, RSP is assembled as MOVD $0x22220000, R27, CMPW R27, RSP(CMP (extended register))
What did you see instead?
CMPW $0x2222000, RSP is assembled as MOVD $0x22220000, R27, CMPW R27, ZR(CMP (shifted register))
The text was updated successfully, but these errors were encountered:
zhangfannie
changed the title
cmd/internal/obj/arm64: when the immediate is MOVCON type, assembler handles cmp/cmn (immediate) instruction incorrectly.
cmd/internal/obj/arm64: when the immediate is MOVCON/BITCON type, assembler handles "cmp/cmn $immediate, RSP" instruction incorrectly.
May 25, 2018
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +87a18c6 Tue May 22 02:58:04 2018 +0000 linux/arm64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?GOARCH="arm64"
GOBIN=""
GOCACHE="/home/fanzha02/.cache/go-build"
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/fanzha02/go"
GORACE=""
GOROOT="/mnt/share/homes/fanzha02/RefineAsm/golang"
GOTMPDIR=""
GOTOOLDIR="/mnt/share/homes/fanzha02/RefineAsm/golang/pkg/tool/linux_arm64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build672309942=/tmp/go-build -gno-record-gcc-switches"
What did you do?
check assembler assembly instruction "CMPW $0x22220000, RSP", the instruction is encoded as two binary 5b44a4d2 ff031b6b. binary 5b44a4d2 is decoded as MOVD $0x2222000, R27, binary ff031b6b is decoded as CMPW R27, ZR.
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
CMPW $0x2222000, RSP is assembled as MOVD $0x22220000, R27, CMPW R27, RSP(CMP (extended register))
What did you see instead?
CMPW $0x2222000, RSP is assembled as MOVD $0x22220000, R27, CMPW R27, ZR(CMP (shifted register))
The text was updated successfully, but these errors were encountered: