i386: enable REGPARM by default
PATCH 1/1 i386: enable REGPARM by default
This patch should _not_ go into Linus' tree.
At some time in the future, we want to unconditionally enable REGPARM on i386.
Let's give it a bit broader testing coverage among -mm users.
This patch:
- removes the dependency of REGPARM on EXPERIMENTAL
- let REGPARM default to y
This patch assumes that people who use -mm are willing to test some more experimental features.
After this patch, REGPARM is still a config option users can disable.
arch/i386/Kconfig renamed from arch/i386/Kconfig.old +2 -3
@@ -911,9 +911,8 @@ default y config REGPARM - bool "Use register arguments (EXPERIMENTAL)" - depends on EXPERIMENTAL - default n + bool "Use register arguments" + default y help Compile the kernel with -mregparm=3. This uses a different ABI and passes the first three arguments of a function call in registers.
Quoted 6 lines · Adrian Bunk
This patch should _not_ go into Linus' tree.
At some time in the future, we want to unconditionally enable REGPARM on i386.
Let's give it a bit broader testing coverage among -mm users.
iirc problem is that gcc 2.95 and possibly 3.0.x have some known miscompilations with regparams. That is why it was only used with fastcall for a long time. One 3.1.x+ it should be safe. But you cannot express dependencies on the compiler version in Kconfig right now.
Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea, that would allow many other nice things.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 6 lines · Adrian Bunk
This patch should _not_ go into Linus' tree.
At some time in the future, we want to unconditionally enable REGPARM on i386.
Let's give it a bit broader testing coverage among -mm users.
Quoted 8 lines
iirc problem is that gcc 2.95 and possibly 3.0.x have some known miscompilations with regparams. That is why it was only used with fastcall for a long time. One 3.1.x+ it should be safe. But you cannot express dependencies on the compiler version in
Kconfigright now.Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea, that would allow many other nice things.
If you'd read either arch/i386/Makefile or the help text for CONFIG_REGPARM, you'd have noticed that we do never use regparm with gcc < 3.0 .
Quoted 1 line
-Andi
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 16 lines · Adrian Bunk
Quoted 15 lines · Andi Kleen
Quoted 6 lines · Adrian Bunk
This patch should _not_ go into Linus' tree.
At some time in the future, we want to unconditionally enable REGPARM on i386.
Let's give it a bit broader testing coverage among -mm users.
iirc problem is that gcc 2.95 and possibly 3.0.x have some known miscompilations with regparams. That is why it was only used with fastcall for a long time. One 3.1.x+ it should be safe. But you cannot express dependencies on the compiler version in
Kconfigright now.
Quoted 6 lines
Quoted 2 lines
Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea, that would allow many other nice things.
If you'd read either
arch/i386/Makefileor the help text forCONFIG_REGPARM, you'd have noticed that we do never use regparm with gcc < 3.0 .
Yes, this means you cannot have binary compatible kernels compiled with different compilers. Which might be a bad thing. For that reason alone I would keep the config.
-Andi
Quoted 4 lines
Yes, this means you cannot have binary compatible kernels compiled with different compilers. Which might be a bad thing.
you already have that anyway!
There are several kernel data structures that have padding in them ifdef'd on older gcc versions just to work around bugs; gcc2 -> gcc3 as a result has a major different abi anyway so I don't think your argument holds.. (and in 2.6, the gcc version is part of the VERMAGIC so the exact compiler is enforced anyway)
Quoted 20 lines · Andi Kleen
Quoted 19 lines · Adrian Bunk
Quoted 17 lines · Andi Kleen
Quoted 6 lines · Adrian Bunk
This patch should _not_ go into Linus' tree.
At some time in the future, we want to unconditionally enable REGPARM on i386.
Let's give it a bit broader testing coverage among -mm users.
iirc problem is that gcc 2.95 and possibly 3.0.x have some known miscompilations with regparams. That is why it was only used with fastcall for a long time. One 3.1.x+ it should be safe. But you cannot express dependencies on the compiler version in
Kconfigright now.Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea, that would allow many other nice things.
Quoted 7 lines
Quoted 3 lines
If you'd read either
arch/i386/Makefileor the help text forCONFIG_REGPARM, you'd have noticed that we do never use regparm with gcc < 3.0 .Yes, this means you cannot have binary compatible kernels compiled with different compilers. Which might be a bad thing. For that reason alone I would keep the config.
We never guarantee binary compatibility with different compilers.
And gcc 2 <-> gcc 3 is an example where it's easy to see that there's no binary compatibility in the kernel.
Quoted 1 line
-Andi
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed