Page MenuHomeFreeBSD

share/mk/bsd.cpu.mk: add F16C feature for i386 and amd64 architectures
ClosedPublic

Authored by dim on Thu, Apr 18, 5:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 30, 12:27 PM
Unknown Object (File)
Tue, Apr 30, 10:45 AM
Unknown Object (File)
Fri, Apr 26, 2:13 AM
Unknown Object (File)
Fri, Apr 26, 2:12 AM
Unknown Object (File)
Fri, Apr 26, 2:12 AM
Unknown Object (File)
Fri, Apr 26, 2:11 AM
Unknown Object (File)
Thu, Apr 25, 8:08 PM
Unknown Object (File)
Sun, Apr 21, 8:19 PM
Subscribers

Details

Summary

As discussed in bug 278417, some ports require the F16C instruction set
to compile, but there is no way yet to detect whether the currently
chosen CPUTYPE supports this feature.

Add the feature to the MACHINE_CPU variable, for each processor that
supports it. The list of processors was extracted from clang 18's -dM
output, filtered on the F16C define.

PR: 278417
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dim requested review of this revision.Thu, Apr 18, 5:51 PM

Seems fine.

I would be nice if these lists were sorted, but they already weren't so no need to fix now. I do wonder if there's a better way to store this data, but given the number of Intel SKUs I suspect not...

This revision is now accepted and ready to land.Thu, Apr 18, 6:00 PM
share/mk/bsd.cpu.mk
160

what happened here? (${CPUTYPE} == ${CPUTYPE} == "bdver1")

This revision now requires review to proceed.Thu, Apr 18, 6:06 PM
share/mk/bsd.cpu.mk
160

This test got split, similarly to the one below, because bdver1 does *not* support f16c. But my editor tricked me ;)

Seems fine.

I would be nice if these lists were sorted, but they already weren't so no need to fix now. I do wonder if there's a better way to store this data, but given the number of Intel SKUs I suspect not...

Yes, it's tricky to make this kind of matrix readable in a Makefile, without resorting to nasty tricks.

I guess the easiest to read would be a flat list of all individual CPUs with their features, but then it becomes very long.

Btw another thing: is there any particular reason we don't error out if an unrecognized CPUTYPE value is given? I just ran some tests with CPUTYPE set to bogus values, and it happily continues...

This revision is now accepted and ready to land.Thu, Apr 18, 6:14 PM