Join GitHub today
cmd/compile: invalid instruction error for FMOVD when compiling for 387 #22429
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
I can't reproduce this, anyway:
the build command succeeds and the generated test binary runs fine. Not sure what I'm doing wrong.
I can't reproduce yet, but I think I know what is wrong.
Normally this happens for ops with indexed addressing mode, and scale==1. Then the order of the base and index registers don't matter to SSA, so they can appear in either order. We have code to swap them during assembly generation, like this (from amd64/ssa.go):
I'll prepare a CL. It would be nice to be able to reproduce the OP's problem so we can be sure it is fixed.
changed the title
cmd/compile: invalid instruction error for FMOVD when compiling for 386
Oct 25, 2017
Thank you all for looking at this so quickly!
@randall77: Like @ALTree said, this is from the 1.8 branch, that's why you were missing the package. And about the non-reproducibility, maybe something is slightly different because of our patches in Debian..
In any case, I am now rebuilding the golang-go Debian package with this patch, to see if the problem is solved.