Building GCC with SSE/SSE2 enabled
Posted: Wed Aug 25, 2021 7:15 pm
Hello.
I've recently figured out (or at least I think I've figured out) how to enable SSE/SSE2 in my kernel.
Now in my kernel (which uses a separate compiler than my userspace programs), I've included the -msse and -msse2 flags and it seems to have generated sse instructions since XMM0 is not 0.
However, for my userspace programs, I want SSE/SSE2 optimizations enabled by default (when -O3 is applied).
I've tried building with --enable-sse --enable-float --enable-sse2 but it still shows it not enabled:On my linux system's default gcc, it shows -msse and -msse2 as [enabled].
I've recently figured out (or at least I think I've figured out) how to enable SSE/SSE2 in my kernel.
Now in my kernel (which uses a separate compiler than my userspace programs), I've included the -msse and -msse2 flags and it seems to have generated sse instructions since XMM0 is not 0.
However, for my userspace programs, I want SSE/SSE2 optimizations enabled by default (when -O3 is applied).
I've tried building with --enable-sse --enable-float --enable-sse2 but it still shows it not enabled:
Code: Select all
i686-tritium-gcc -Q --help=target | grep sse
-mno-sse4 [enabled]
-msse [disabled]
-msse2 [disabled]
-msse2avx [disabled]
-msse3 [disabled]
-msse4 [disabled]
-msse4.1 [disabled]
-msse4.2 [disabled]
-msse4a [disabled]
-msse5
-msseregparm [disabled]
-mssse3 [disabled]
Known assembler dialects (for use with the -masm= option):
387 387+sse 387,sse both sse sse+387 sse,387