Re: libm i386: make use of __builtin_cpu_supports()

Christian Weisgerber <[email protected]> Wed, 29 Jul 2026 21:43:12 +0200
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
Christian Weisgerber:

> On i386, libm queries the machdep.sse sysctl to check at runtime
> whether the CPU supports SSE.
> 
> kettenis@ has pointed out elsewhere that the compiler runtime on
> x86 now provides a CPU feature array that we can test with
> __builtin_cpu_supports().  No need to handroll this ourselves.

I belatedly wondered whether this might disproportionally affect
the install media since libcompiler_rt's x86.o is a bit chunky ...

$ ar x /usr/lib/libcompiler_rt.a x86.o
$ size x86.o
text    data    bss     dec     hex
5036    4       28      5068    13cc
$ strip x86.o; gzip x86.o; ls -l x86.o.gz                       
-rw-r--r--  1 naddy  naddy  2826 Jul 29 21:38 x86.o.gz

... but it doesn't make it into the media.

-- 
Christian "naddy" Weisgerber                          [email protected]