Page MenuHomeFreeBSD

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

Authored by dim on Apr 18 2024, 5:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 2:07 PM
Unknown Object (File)
Fri, Oct 25, 8:20 PM
Unknown Object (File)
Fri, Oct 25, 8:20 PM
Unknown Object (File)
Fri, Oct 25, 8:20 PM
Unknown Object (File)
Fri, Oct 25, 8:20 PM
Unknown Object (File)
Fri, Oct 25, 8:04 PM
Unknown Object (File)
Oct 2 2024, 4:54 PM
Unknown Object (File)
Sep 25 2024, 6:11 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 Passed
Unit
No Test Coverage
Build Status
Buildable 57198
Build 54086: arc lint + arc unit

Event Timeline

dim requested review of this revision.Apr 18 2024, 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.Apr 18 2024, 6:00 PM
share/mk/bsd.cpu.mk
160

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

This revision now requires review to proceed.Apr 18 2024, 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.Apr 18 2024, 6:14 PM