Skip to content

cmd/asm: add Intel architecture ISA extension for user interrupts #57502

Open

Description

@markbrown314

What version of Go are you using (go version)?

$ go version
go version go1.19.4 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/XXXX/.cache/go-build"
GOENV="/home/XXXX/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/XXXX/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/XXXX/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/XXXX/Code/personal.XXXX.user.interrupts/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/XXXX/Code/personal.XXXX.user.interrupts/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.4"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2212410684=/tmp/go-build -gno-record-gcc-switches"

The issue

Go assembler for x86 does not currently have support for the user interrupts instructions: CLUI, STUI, SENDUIPI, TESTUI, UIRET. These instructions are supported by the Sapphire Rapids platform and specified in Intel ISA Extensions Reference (since rev 041). I believe the x86_64 is assembler instructions in aenum.go are generated from a csv generated from X86spec and Intel® 64 and IA-32 Architectures Software Developer's Manual. Given that I am not supposed to modify aenum.go and aenames.go there is no viable way to add extended ISA instructions to the assembler.

Activity

  1. gopherbot commented on Dec 29, 2022

    @gopherbot
    Contributor

    Change https://go.dev/cl/459935 mentions this issue: cmd/asm/internal: added user interrupts support

  2. changed the title [-]cmd/asm/internal would like to add Intel architecture ISA extension for user interrupts[/-] [+]cmd/asm/internal: would like to add Intel architecture ISA extension for user interrupts[/+] on Dec 29, 2022
  3. added
    FeatureRequestIssues asking for a new feature that does not need a proposal.
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Dec 29, 2022
  4. added this to the Backlog milestone on Dec 29, 2022
  5. dmitshur commented on Dec 29, 2022

    @dmitshur
    Member

    CC @golang/compiler.

  6. modified the milestones: Backlog, Unplanned on Dec 29, 2022
  7. changed the title [-]cmd/asm/internal: would like to add Intel architecture ISA extension for user interrupts[/-] [+]cmd/asm: add Intel architecture ISA extension for user interrupts[/+] on Dec 29, 2022
  8. cherrymui commented on Dec 29, 2022

    @cherrymui
    Member

    Thanks for being interested in contribution!

    aenum.go is generated from golang.org/x/arch/x86/x86avxgen , which in turn uses x86/xeddata. But there have been hand modifications to the file since then. You're welcome modify the code generator to have them generated. But if that is difficult, another hand modification is probably fine. Thanks.

  9. markbrown314 commented on Jan 10, 2023

    @markbrown314
    Author

    I will take a look at modifying it and resubmitting. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions