diff options
| author | Russ Cox <rsc@golang.org> | 2021-04-15 23:05:49 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2021-04-16 19:20:53 +0000 |
| commit | 95ed5c3800a87ddf9b0ec3958eaaa1a969306293 (patch) | |
| tree | cb0c555f10ab706a5c491cbe48dd36da16658a1e /src/cmd/internal/obj/arm | |
| parent | 2fc0ebb623e2859094ad3f41e61325df0c2163f8 (diff) | |
| download | go-95ed5c3800a87ddf9b0ec3958eaaa1a969306293.tar.xz | |
internal/buildcfg: move build configuration out of cmd/internal/objabi
The go/build package needs access to this configuration,
so move it into a new package available to the standard library.
Change-Id: I868a94148b52350c76116451f4ad9191246adcff
Reviewed-on: https://go-review.googlesource.com/c/go/+/310731
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/internal/obj/arm')
| -rw-r--r-- | src/cmd/internal/obj/arm/asm5.go | 7 | ||||
| -rw-r--r-- | src/cmd/internal/obj/arm/obj5.go | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/cmd/internal/obj/arm/asm5.go b/src/cmd/internal/obj/arm/asm5.go index ebb98b4859..ccf5f9e7f8 100644 --- a/src/cmd/internal/obj/arm/asm5.go +++ b/src/cmd/internal/obj/arm/asm5.go @@ -34,6 +34,7 @@ import ( "cmd/internal/obj" "cmd/internal/objabi" "fmt" + "internal/buildcfg" "log" "math" "sort" @@ -976,7 +977,7 @@ func (c *ctxt5) aclass(a *obj.Addr) int { if immrot(^uint32(c.instoffset)) != 0 { return C_NCON } - if uint32(c.instoffset) <= 0xffff && objabi.GOARM == 7 { + if uint32(c.instoffset) <= 0xffff && buildcfg.GOARM == 7 { return C_SCON } if x, y := immrot2a(uint32(c.instoffset)); x != 0 && y != 0 { @@ -3044,7 +3045,7 @@ func (c *ctxt5) omvl(p *obj.Prog, a *obj.Addr, dr int) uint32 { func (c *ctxt5) chipzero5(e float64) int { // We use GOARM=7 to gate the use of VFPv3 vmov (imm) instructions. - if objabi.GOARM < 7 || math.Float64bits(e) != 0 { + if buildcfg.GOARM < 7 || math.Float64bits(e) != 0 { return -1 } return 0 @@ -3052,7 +3053,7 @@ func (c *ctxt5) chipzero5(e float64) int { func (c *ctxt5) chipfloat5(e float64) int { // We use GOARM=7 to gate the use of VFPv3 vmov (imm) instructions. - if objabi.GOARM < 7 { + if buildcfg.GOARM < 7 { return -1 } diff --git a/src/cmd/internal/obj/arm/obj5.go b/src/cmd/internal/obj/arm/obj5.go index edb384806b..1454d8a7c9 100644 --- a/src/cmd/internal/obj/arm/obj5.go +++ b/src/cmd/internal/obj/arm/obj5.go @@ -34,6 +34,7 @@ import ( "cmd/internal/obj" "cmd/internal/objabi" "cmd/internal/sys" + "internal/buildcfg" "log" ) @@ -64,7 +65,7 @@ func progedit(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc) { ctxt.Diag("%v: TLS MRC instruction must write to R0 as it might get translated into a BL instruction", p.Line()) } - if objabi.GOARM < 7 { + if buildcfg.GOARM < 7 { // Replace it with BL runtime.read_tls_fallback(SB) for ARM CPUs that lack the tls extension. if progedit_tlsfallback == nil { progedit_tlsfallback = ctxt.Lookup("runtime.read_tls_fallback") |
