Gentoo Archives: gentoo-user

From: Volker Armin Hemmann <volkerarmin@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: CFLAGs for kernel compilation
Date: Sat, 02 May 2015 17:04:19
Message-Id: 55450389.7070900@googlemail.com
In Reply to: [gentoo-user] Re: CFLAGs for kernel compilation by Nikos Chantziaras
1 Am 02.05.2015 um 14:38 schrieb Nikos Chantziaras:
2 > On 02/05/15 15:10, Volker Armin Hemmann wrote:
3 >> Am 02.05.2015 um 14:06 schrieb Nikos Chantziaras:
4 >>> On 02/05/15 14:37, Volker Armin Hemmann wrote:
5 >>>> Am 02.05.2015 um 13:25 schrieb Nikos Chantziaras:
6 >>>>>>>
7 >>>>>>> The kernel uses -O2 and several -march variants (e.g.
8 >>>>>>> -march=core2).
9 >>>>>>> Several other options are used to prevent GCC from generating
10 >>>>>>> unsuitable code.
11 >>>>>>>
12 >>>>>>> Specifying another -march variant does not affect the optimizer
13 >>>>>>> though. It only affects the code generator. If you don't modify the
14 >>>>>>> other CFLAGS and only change -march, you will not get FP
15 >>>>>>> instructions
16 >>>>>>> unless you use FP in the code.
17 >>>>>>
18 >>>>>> http://www.agner.org/optimize/calling_conventions.pdf
19 >>>>>
20 >>>>> Not sure what you're trying to say.
21 >>>>>
22 >>>>
23 >>>> that simd is not save in kernel if not carefully guarded.
24 >>>>
25 >>>> Really people, just don't fuck around with the cflags.
26 >>>
27 >>> I still fail to see the relevance. Unless you mean using a different
28 >>> -O level. In that case, yes. You shouldn't. But I was talking about
29 >>> -march.
30 >>>
31 >>
32 >> you said this
33 >>
34 >>>
35 >>> (note that SIMD is not FP and is perfectly fine in the kernel.)
36 >>
37 >> and I have shown you that you are wrong.
38 >
39 > Not sure why you think that. The kernel crypto routines are full of
40 > SIMD code (like SSE and AVX.) Automatic vectorization wouldn't work.
41 > But -march is not going to introduce that
42
43 and never used in interrupt context and carefully guarded. You act like
44 'oh, you can use simd instructions without any consideration' and that
45 is just not true.

Replies

Subject Author
[gentoo-user] Re: CFLAGs for kernel compilation James <wireless@×××××××××××.com>