* UML and fastcall/FASTCALL
@ 2006-12-08 12:59 Adrian Bunk
2006-12-08 16:33 ` Jeff Dike
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2006-12-08 12:59 UTC (permalink / raw)
To: jdike; +Cc: user-mode-linux-devel, linux-kernel
UML on i386 is now the only case where fastcall/FASTCALL is not a noop.
There are two use cases for fastcall/FASTCALL in UML on i386:
1. optimization for C code
A faster calling convention is used for the functions annotated this way.
2. interfacing with assembler code
But include/asm-um/linkage.h contains the following:
<-- snip -->
#ifndef __ASM_UM_LINKAGE_H
#define __ASM_UM_LINKAGE_H
#include "asm/arch/linkage.h"
/* <linux/linkage.h> will pick sane defaults */
#ifdef CONFIG_GPROF
#undef FASTCALL
#undef fastcall
#endif
#endif
<-- snip -->
E.g. if CONFIG_SMP was still available on UML, CONFIG_SMP=y,
CONFIG_GPROF=y would have some horrible effects when calling the
functions in arch/i386/lib/semaphore.S.
Are there any benchmark numbers that the existing fastcall/FASTCALL
annotations in the kernel really make a measurable difference for
C code?
Otherwise, we could use it only for assembler code using this calling
convention (if there is any used by UML) - and CONFIG_GPROF mustn't
change this.
cu
Adrian
--
"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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: UML and fastcall/FASTCALL
2006-12-08 12:59 UML and fastcall/FASTCALL Adrian Bunk
@ 2006-12-08 16:33 ` Jeff Dike
2006-12-08 18:04 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Dike @ 2006-12-08 16:33 UTC (permalink / raw)
To: Adrian Bunk; +Cc: user-mode-linux-devel, linux-kernel
On Fri, Dec 08, 2006 at 01:59:28PM +0100, Adrian Bunk wrote:
> UML on i386 is now the only case where fastcall/FASTCALL is not a noop.
If i386 doesn't use it any more, then UML shouldn't either. The only reason
there's support for it in UML is that I was copying i386.
Jeff
--
Work email - jdike at linux dot intel dot com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: UML and fastcall/FASTCALL
2006-12-08 16:33 ` Jeff Dike
@ 2006-12-08 18:04 ` Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2006-12-08 18:04 UTC (permalink / raw)
To: Jeff Dike; +Cc: user-mode-linux-devel, linux-kernel
On Fri, Dec 08, 2006 at 11:33:04AM -0500, Jeff Dike wrote:
> On Fri, Dec 08, 2006 at 01:59:28PM +0100, Adrian Bunk wrote:
> > UML on i386 is now the only case where fastcall/FASTCALL is not a noop.
>
> If i386 doesn't use it any more, then UML shouldn't either. The only reason
> there's support for it in UML is that I was copying i386.
It's a noop on i386 due to -mregparm=3 ...
> Jeff
cu
Adrian
--
"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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-08 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-08 12:59 UML and fastcall/FASTCALL Adrian Bunk
2006-12-08 16:33 ` Jeff Dike
2006-12-08 18:04 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox