Gentoo Archives: gentoo-dev

From: Martin Vaeth <martin@×××××.de>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Moving CPU flags into USE_EXPAND
Date: Thu, 15 Jan 2015 12:04:04
Message-Id: m98aaf$c5m$1@ger.gmane.org
In Reply to: Re: [gentoo-dev] Re: Moving CPU flags into USE_EXPAND by Alexis Ballier
1 Alexis Ballier <aballier@g.o> wrote:
2 >> >>
3 >> >> More precisely: When changing the names anyway,
4 >> >> IMHO it would be a very good idea to follow the convention of the
5 >> >> "flag" names in /proc/cpuinfo and add all flags supported
6 >> >> there as possible USE-flags, no matter, whether they are currently
7 >> >> used in some package or not.
8 >> >
9 >> > seriously ?
10 >> >
11 >> > $ grep flags /proc/cpuinfo | head -n 1 | wc -w
12 >> > 94
13
14 Well, currently, we have at least 10-20 already:
15 At a very quick check (probably missing some), I found:
16
17 mmx sse sse2 aes-ni ssse3 sse3 sse4 sse4a sse4.1 sse4.2
18 3des 3dnow 3dnowext
19
20 and probably there are more to be added anyway
21 in future packages.
22
23 I am not even sure whether some of these sse4* are dupes
24 or not since they do not follow /proc/cpuinfo convention.
25 Some others do not follow this convention at all,
26 e.g. "sse3" is called "pni" in /proc/cpuinfo
27 or "aes-ni" is called "aes" in /proc/cpuinfo
28
29 This is mainly what I meant: Currently, users have to look
30 up how sse3 is called in /proc/cpuinfo to understand whether
31 their processor has support for it. This could be automated.
32
33 If not all of the 94 flags are included, it is perhaps not a drama;
34 my main suggestion is to follow /proc/cpuinfo convention in the
35 existing ones.
36
37 > but rather about writing the proper .desc file
38
39 Well, currently the descriptions are:
40
41 3dnow: Use the 3DNow! instruction set
42 mmx: Use the mmx instruction set
43 sse: Use the SSE2 instruction set
44 sse4_1: Enable sse4.1 acceleration
45 ...
46
47 So they are practically useless unless you know anyway what the
48 corresponding processor flags mean.
49 I suggest to start with a "stub" .desc list, e.g.:
50
51 yyy: Use the yyy CPU feature, cf. /proc/cpuinfo
52
53 This is enough for the user to check on which of his systems he
54 might want it. A more verbose description can be added for some
55 flags some day as a bonus; such a list can grow over time, and some
56 experts might want to send some patches to fix/extend the descriptions.
57 But why require for the start more than we have currently?
58 If there is no list to start with, then you can also not expect
59 that somebody will suggest patches (I mean: to a non-listed feature...)

Replies

Subject Author
Re: [gentoo-dev] Re: Moving CPU flags into USE_EXPAND Alexis Ballier <aballier@g.o>