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/compile: out of fixed registers on 386 when building x/arch/vendor/rsc.io/pdf #12840

Closed
minux opened this issue Oct 5, 2015 · 7 comments
Closed

Comments

@minux
Copy link
Member

minux commented Oct 5, 2015

# golang.org/x/arch/vendor/rsc.io/pdf
run compiler with -v for register allocation sites
../../gopath/src/golang.org/x/arch/vendor/rsc.io/pdf/page.go:250: internal compiler error: out of fixed registers
@brian-brazil
Copy link

We've also run into this with Prometheus on both 1.5.3 and 1.6.0, see prometheus/prometheus#1509

@beorn7
Copy link

beorn7 commented Mar 29, 2016

In case it helps, the offending code for prometheus/prometheus#1509 is

var (
    c []byte
    offset uint16
    bitMask [][]byte
)
// ...
c[offset/8] &^= bitMask[1][offset%8]

Breaking the statement into two helps. Both of the below work:

bm := bitMask[1][offset%8]
c[offset/8] &^= bm
newByte := c[offset/8] &^ bitMask[1][offset%8]
c[offset/8] = newByte

@gopherbot
Copy link

CL https://golang.org/cl/24942 mentions this issue.

gopherbot pushed a commit to golang/arch that referenced this issue Jul 15, 2016
This won't be fixed until the SSA backend in Go 1.8, so don't even try
to build. It just clutters the dashboard with red.

Updates golang/go#12840 (out of fixed registers)
Updates golang/go#11811 (subrepos need to be green)

Change-Id: I25b3db4d3bd47d16e7e42a55429b343dc27f9f43
Reviewed-on: https://go-review.googlesource.com/24942
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@randall77
Copy link
Contributor

This should be fixed with the new SSA backend.
(Although I can't reproduce the original problem.)

@gopherbot
Copy link

CL https://golang.org/cl/33247 mentions this issue.

gopherbot pushed a commit to golang/arch that referenced this issue Nov 15, 2016
Fix build failure:

../../gopath/src/golang.org/x/arch/ppc64/ppc64spec/spec.go:146: undefined: pdf.Outline
../../gopath/src/golang.org/x/arch/ppc64/ppc64spec/spec.go:153: undefined: pdf.Outline
../../gopath/src/golang.org/x/arch/ppc64/ppc64spec/spec.go:174: undefined: pdf.Page
../../gopath/src/golang.org/x/arch/ppc64/ppc64spec/spec.go:271: undefined: pdf.Content
../../gopath/src/golang.org/x/arch/ppc64/ppc64spec/spec.go:271: undefined: pdf.Text
../../gopath/src/golang.org/x/arch/ppc64/ppc64spec/spec.go:396: undefined: pdf.Rect

ppc64spec depends on other packages that don't build on 32-bit
systems prior to Go 1.8.

Fixes golang/go#17635
Updates golang/go#12840

Change-Id: I594adef1d0bc498940183215c7c5a958628a254a
Reviewed-on: https://go-review.googlesource.com/33247
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
gopherbot pushed a commit to golang/arch that referenced this issue Jul 15, 2017
Fix build failure:

..\..\gopath\src\golang.org\x\arch\arm64\arm64spec\spec.go:137: undefined: pdf.Outline
..\..\gopath\src\golang.org\x\arch\arm64\arm64spec\spec.go:148: undefined: pdf.Outline
..\..\gopath\src\golang.org\x\arch\arm64\arm64spec\spec.go:167: undefined: pdf.Page
..\..\gopath\src\golang.org\x\arch\arm64\arm64spec\spec.go:167: undefined: pdf.Reader
..\..\gopath\src\golang.org\x\arch\arm64\arm64spec\spec.go:425: undefined: pdf.Content
..\..\gopath\src\golang.org\x\arch\arm64\arm64spec\spec.go:425: undefined: pdf.Text
..\..\gopath\src\golang.org\x\arch\arm64\arm64spec\spec.go:616: undefined: pdf.Rect

arm64spec depends on rsc.io/pdf which does not currently build on 386 platforms.

Updates golang/go#12840

Change-Id: I40de19c617f90bcf696586b57a4d09b1d307f0df
Reviewed-on: https://go-review.googlesource.com/49015
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/49015 mentions this issue: arm64/arm64spec: skip build on 386 targets

@gopherbot
Copy link

Change https://golang.org/cl/49530 mentions this issue: cmd/vendor/golang.org/x/arch: pull updates from x repo

gopherbot pushed a commit that referenced this issue Aug 16, 2017
Vendor from golang.org/x/arch (commit f185940).

Implements #19157

Updates #12840
Updates #20762
Updates #20897
Updates #20096
Updates #20766
Updates #20752
Updates #20096
Updates #19142

Change-Id: Idefb8ba2c355dc07f3b9e8dcf5f00173256a0f0f
Reviewed-on: https://go-review.googlesource.com/49530
Reviewed-by: Cherry Zhang <cherryyz@google.com>
@golang golang locked and limited conversation to collaborators Aug 15, 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

6 participants