Skip to content

cmd/compile: investigate maintaining TOC register r2 for ppc64x by default. #45925

Open
@laboger

Description

@laboger

On ppc64le we have had issues over the years due to the inconsistent setting of the TOC register r2 in Go code. In the C/C++ code that is compiled to be used with cgo, r2 is initialized and expected to be valid, but with the default build mode mode for Go programs it is not.

Due to recent issues #45564 and #45850 another variation of this problem appeared again. Discussions in #45850 lead us to the topic of whether we should be maintaining r2 by default.

This can wait until Go 1.18 but wanted to be sure it didn't get forgotten. We need also need to consider linux-ppc64 (no cgo support) and aix-ppc64 (not sure how that is affected.)

@cherrymui @pmur @Helflym FYI

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.arch-ppc64xcompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions