cvs commit: ports/audio/beast Makefile
Pietro Cerutti
gahr at FreeBSD.org
Thu Sep 8 03:13:10 UTC 2011
On 2011-Sep-07, 15:57, Alexey Dokuchaev wrote:
> On Wed, Sep 07, 2011 at 02:36:13PM +0000, Pietro Cerutti wrote:
> > gahr 2011-09-07 14:36:13 UTC
> >
> > Modified files:
> > audio/beast Makefile
> > Log:
> > - Unbreak
> > - Use sysctl to find out whether SSE is supported
>
> What's wrong with .if ${MACHINE_CPU:Msse} ?
I found out that MACHINE_CPU does not reflect the actual caps of the CPU
the process is currently running on. This leads to false negative (no
sse in MACHINE_CPU on SSE-capable CPUs). Look at these outputs from a
test machine of mine:
> make -V MACHINE_CPU
i486
> sysctl hw.instruction_sse
hw.instruction_sse: 1
> grep ^CPU /var/run/dmesg.boot
CPU: Intel(R) Pentium(R) 4 CPU 1.70GHz (1694.54-MHz 686-class CPU)
> grep Features /var/run/dmesg.boot
Features=0x3febfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM>
Unfortunately, using a sysctl here is the only reliable way I found to
determine SSE capabilities.
Any suggestions how to do it better is warmly welcome!
--
Pietro Cerutti
The FreeBSD Project
gahr at FreeBSD.org
PGP Public Key:
http://gahr.ch/pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20110908/c4817d0a/attachment.pgp
More information about the cvs-all
mailing list