Skip to content
New issue

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

cmd/internal/obj/arm64: golang assembler handles arm64 instruction fcmp/fcmpe incorrectly #21567

Closed
zhangfannie opened this issue Aug 23, 2017 · 1 comment

Comments

@zhangfannie
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +324b2e9 Wed Aug 23 03:13:15 2017 +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=""
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/fanzha02/go"
GORACE=""
GOROOT="/mnt/share/homes/fanzha02/push/asmforus/golang"
GOTOOLDIR="/mnt/share/homes/fanzha02/push/asmforus/golang/pkg/tool/linux_arm64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build043970017=/tmp/go-build -gno-record-gcc-switches"
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"

What did you do?

cd src/cmd/asm/internal/asm
vi testdate/arm64enc.s
uncomment FCMP/FCMPE test cases
go test -run "ARM64Encoder"

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?

go test successfully

What did you see instead?

the FCMP/FCMPE test cases are failed, and please refer to the detailed error information, as below.
(testdata/arm64enc.s:401) FCMPS F3, F17: have encoding 0020231e, want 2022231e
(testdata/arm64enc.s:402) FCMPS $(0.0), F8: have encoding 0020201e, want 0821201e
(testdata/arm64enc.s:403) FCMPD F11, F27: have encoding 00206b1e, want 60236b1e
(testdata/arm64enc.s:404) FCMPD $(0.0), F25: have encoding 0020601e, want 2823601e
(testdata/arm64enc.s:405) FCMPES F16, F30: have encoding 1020301e, want d023301e
(testdata/arm64enc.s:406) FCMPES $(0.0), F29: have encoding 1020201e, want b823201e
(testdata/arm64enc.s:407) FCMPED F13, F10: have encoding 10206d1e, want 50216d1e
(testdata/arm64enc.s:408) FCMPED $(0.0), F25: have encoding 1020601e, want 3823601e

@gopherbot
Copy link

Change https://golang.org/cl/57852 mentions this issue: cmd/internal/obj/arm64: fix assemble fcmp/fcmpe bug

@golang golang locked and limited conversation to collaborators Aug 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants