diff options
author | Keith Randall <khr@golang.org> | 2020-10-06 14:42:15 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2020-10-06 22:49:38 +0000 |
commit | 04b8a9fea57e37589d82410281f22ebde0027808 (patch) | |
tree | b4096a522fb770e00a9257cd4e6ddacb97478808 /src/cmd/compile/internal/x86 | |
parent | 930fa890c9b6a75700bda3dc4043de81350749ea (diff) | |
download | go-04b8a9fea57e37589d82410281f22ebde0027808.tar.gz go-04b8a9fea57e37589d82410281f22ebde0027808.zip |
all: implement GO386=softfloat
Backstop support for non-sse2 chips now that 387 is gone.
RELNOTE=yes
Change-Id: Ib10e69c4a3654c15a03568f93393437e1939e013
Reviewed-on: https://go-review.googlesource.com/c/go/+/260017
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/x86')
-rw-r--r-- | src/cmd/compile/internal/x86/galign.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/x86/galign.go b/src/cmd/compile/internal/x86/galign.go index 2d20b6a6d0..e137daa3fc 100644 --- a/src/cmd/compile/internal/x86/galign.go +++ b/src/cmd/compile/internal/x86/galign.go @@ -7,6 +7,9 @@ package x86 import ( "cmd/compile/internal/gc" "cmd/internal/obj/x86" + "cmd/internal/objabi" + "fmt" + "os" ) func Init(arch *gc.Arch) { @@ -15,6 +18,18 @@ func Init(arch *gc.Arch) { arch.SSAGenValue = ssaGenValue arch.SSAGenBlock = ssaGenBlock arch.MAXWIDTH = (1 << 32) - 1 + switch v := objabi.GO386; v { + case "sse2": + case "softfloat": + arch.SoftFloat = true + case "387": + fmt.Fprintf(os.Stderr, "unsupported setting GO386=387. Consider using GO386=softfloat instead.\n") + gc.Exit(1) + default: + fmt.Fprintf(os.Stderr, "unsupported setting GO386=%s\n", v) + gc.Exit(1) + + } arch.ZeroRange = zerorange arch.Ginsnop = ginsnop |