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

Compiler(amd64): return false on SSE4 unsupported CPUs from platform.CompilerSupported #580

Closed
mathetake opened this issue May 19, 2022 · 2 comments · Fixed by #1121
Closed
Assignees
Labels
enhancement New feature or request

Comments

@mathetake
Copy link
Member

mathetake commented May 19, 2022

Is your feature request related to a problem? Please describe.

We've already used SSE4.x features in floating-point conversions and SIMD implementations. However, some fairly old amd64 CPUs do not have support for these features.

Practically speaking, SSE4.1 features was introduced 15-years ago, and actually, the SIMD proposal has been merged with the baseline being SSE4 on Intel CPUs(WebAssembly/simd#201 (comment)). It seems really hard (maybe impossible) to implement without the feature (bytecodealliance/wasmtime#3809, bytecodealliance/wasm-micro-runtime#1022, wasmerio/wasmer#2775).

It's nice if we could have support for these CPUs, but given that almost all amd64 CPUs have SSE4, that's not our priority and revisit what we can do.

Describe the solution you'd like

Get the available features by CPUID instruction, and raise a compilation error if the features are necessary while not available in the hardware.

Describe alternatives you've considered

N/A

Additional context

Go has introduced GOAMD64 flag as of 1.18, and we could leverage the flag and check if the flag has >=v2.

@mathetake mathetake added the enhancement New feature or request label May 19, 2022
@mathetake
Copy link
Member Author

ps I would like to put this limitation only on SIMD instructions, so I will identity where SSE4.1 features are used in non-SIMD instructions (one place I can think of is floating conversions.

@mathetake
Copy link
Member Author

assigning @evacchi

@mathetake mathetake changed the title Compiler(amd64): raise error on SSE4 unsupported CPUs when needed Compiler(amd64): return false on SSE4 unsupported CPUs from platform.CompilerSupported Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants