-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/compile: mips64 instruction UNPREDICTABLE error #30459
Comments
I looked the asm of file A, it showed below: [wuheng@localhost]$ mips64--gnu-objdump -S A | less
...
mask := rune(x) << 31 >> 31
a9558: 00010ff8 dsll at,at,0x1f
a955c: 00200821 move at,at
a9560: 00010ffb dsra at,at,0x1f
... It seemd golang use AADDU instruction to sign-extended to high 32 bits(
I debuged the program A, and I found the high 32 bits are not equal in at register! |
You can replace |
Change https://golang.org/cl/164758 mentions this issue: |
Thanks for the investigation. The MIPS64 port was written according to MIPS III ISA, which, as far as I know, doesn't have such restriction. That said, if the fix works on both old and new MIPS64 machines, I'm ok with it. |
I looked the MIPS III ISA, there is a line of |
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?
Copy file A to mips64 system level qemu...
What did you expect to see?
In qemu-system-mips64:
What did you see instead?
In qemu-system-mips64:
My source code main.go
The text was updated successfully, but these errors were encountered: