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/asm: add Intel architecture ISA extension for user interrupts #57502

Open
markbrown314 opened this issue Dec 29, 2022 · 4 comments
Open

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

markbrown314 opened this issue Dec 29, 2022 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@markbrown314
Copy link

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.

@gopherbot
Copy link

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

@dmitshur dmitshur 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 Dec 29, 2022
@dmitshur dmitshur added FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Dec 29, 2022
@dmitshur dmitshur added this to the Backlog milestone Dec 29, 2022
@dmitshur
Copy link
Contributor

CC @golang/compiler.

@cherrymui cherrymui modified the milestones: Backlog, Unplanned Dec 29, 2022
@cherrymui cherrymui 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 Dec 29, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 29, 2022
@cherrymui
Copy link
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.

@markbrown314
Copy link
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
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: No status
Development

No branches or pull requests

4 participants