Skip to content

Conversation

@mekhontsev
Copy link
Contributor

To have <immintrin.h>, we need to check the SSE2 and AVX macros.

To have <immintrin.h> we need to check the __SSE2__ and __AVX__ macros.
@saghul
Copy link
Contributor

saghul commented May 15, 2025

What problem did you run into?

@mekhontsev
Copy link
Contributor Author

When I tried to compile xsum.c with AVX2 enabled (latest MSVC), I got the missing definitions from immintrin.h

@saghul
Copy link
Contributor

saghul commented May 16, 2025

IS that something we could add to the CI?

@mekhontsev
Copy link
Contributor Author

Since QuickJS already uses SSE/AVX, it would be better to have at least one CMake target to check this code path...

@saghul
Copy link
Contributor

saghul commented May 16, 2025

I don't have much experience in that myself 😅 What do you have in mind?

@mekhontsev
Copy link
Contributor Author

mekhontsev commented May 16, 2025

At the first stage we can just add the simplest check (something like):

if(MSVC)
    add_library(xsum xsum.c)
    target_compile_options(xsum PRIVATE /arch:AVX2)
endif()

@saghul saghul merged commit 47d6ce0 into quickjs-ng:master May 26, 2025
127 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants