* [PATCH] Remove fastcall references in x86_64 code.
@ 2007-01-02 21:09 Glauber de Oliveira Costa
2007-01-03 20:13 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Glauber de Oliveira Costa @ 2007-01-02 21:09 UTC (permalink / raw)
To: linux-kernel, akpm
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
Unlike x86, x86_64 already passes arguments in registers. The use of
regparm attribute makes no difference in produced code, and the use of
fastcall just bloats the code.
--
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
[-- Attachment #2: fastcall.patch --]
[-- Type: text/plain, Size: 3068 bytes --]
diff -rup linux-2.6.19.1-devel/arch/x86_64/kernel/acpi/sleep.c linux-2.6.19.1/arch/x86_64/kernel/acpi/sleep.c
--- linux-2.6.19.1-devel/arch/x86_64/kernel/acpi/sleep.c 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/arch/x86_64/kernel/acpi/sleep.c 2007-01-02 12:50:58.000000000 -0200
@@ -58,7 +58,7 @@ unsigned long acpi_wakeup_address = 0;
unsigned long acpi_video_flags;
extern char wakeup_start, wakeup_end;
-extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
+extern unsigned long acpi_copy_wakeup_routine(unsigned long);
static pgd_t low_ptr;
diff -rup linux-2.6.19.1-devel/arch/x86_64/kernel/x8664_ksyms.c linux-2.6.19.1/arch/x86_64/kernel/x8664_ksyms.c
--- linux-2.6.19.1-devel/arch/x86_64/kernel/x8664_ksyms.c 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/arch/x86_64/kernel/x8664_ksyms.c 2007-01-02 12:50:36.000000000 -0200
@@ -34,8 +34,8 @@ EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(clear_page);
#ifdef CONFIG_SMP
-extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
-extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
+extern void __write_lock_failed(rwlock_t *rw);
+extern void __read_lock_failed(rwlock_t *rw);
EXPORT_SYMBOL(__write_lock_failed);
EXPORT_SYMBOL(__read_lock_failed);
#endif
diff -rup linux-2.6.19.1-devel/include/asm-x86_64/hw_irq.h linux-2.6.19.1/include/asm-x86_64/hw_irq.h
--- linux-2.6.19.1-devel/include/asm-x86_64/hw_irq.h 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/include/asm-x86_64/hw_irq.h 2007-01-02 12:51:30.000000000 -0200
@@ -91,7 +91,7 @@ extern void enable_8259A_irq(unsigned in
extern int i8259A_irq_pending(unsigned int irq);
extern void make_8259A_irq(unsigned int irq);
extern void init_8259A(int aeoi);
-extern void FASTCALL(send_IPI_self(int vector));
+extern void send_IPI_self(int vector);
extern void init_VISWS_APIC_irqs(void);
extern void setup_IO_APIC(void);
extern void disable_IO_APIC(void);
diff -rup linux-2.6.19.1-devel/include/asm-x86_64/mutex.h linux-2.6.19.1/include/asm-x86_64/mutex.h
--- linux-2.6.19.1-devel/include/asm-x86_64/mutex.h 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/include/asm-x86_64/mutex.h 2007-01-02 12:49:42.000000000 -0200
@@ -21,7 +21,7 @@ do { \
unsigned long dummy; \
\
typecheck(atomic_t *, v); \
- typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \
+ typecheck_fn(void (*)(atomic_t *), fail_fn); \
\
__asm__ __volatile__( \
LOCK_PREFIX " decl (%%rdi) \n" \
@@ -47,7 +47,7 @@ do { \
*/
static inline int
__mutex_fastpath_lock_retval(atomic_t *count,
- int fastcall (*fail_fn)(atomic_t *))
+ int (*fail_fn)(atomic_t *))
{
if (unlikely(atomic_dec_return(count) < 0))
return fail_fn(count);
@@ -67,7 +67,7 @@ do { \
unsigned long dummy; \
\
typecheck(atomic_t *, v); \
- typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \
+ typecheck_fn(void (*)(atomic_t *), fail_fn); \
\
__asm__ __volatile__( \
LOCK_PREFIX " incl (%%rdi) \n" \
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Remove fastcall references in x86_64 code.
@ 2007-01-02 21:51 Glauber de Oliveira Costa
0 siblings, 0 replies; 3+ messages in thread
From: Glauber de Oliveira Costa @ 2007-01-02 21:51 UTC (permalink / raw)
To: linux-kernel, akpm
[-- Attachment #1: Type: text/plain, Size: 353 bytes --]
Oops ;-) resending, as I forgot to sign last version:
Unlike x86, x86_64 already passes arguments in registers. The use of
regparm attribute makes no difference in produced code, and the use of
fastcall just bloats the code.
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
--
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
[-- Attachment #2: fastcall.patch --]
[-- Type: text/plain, Size: 3068 bytes --]
diff -rup linux-2.6.19.1-devel/arch/x86_64/kernel/acpi/sleep.c linux-2.6.19.1/arch/x86_64/kernel/acpi/sleep.c
--- linux-2.6.19.1-devel/arch/x86_64/kernel/acpi/sleep.c 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/arch/x86_64/kernel/acpi/sleep.c 2007-01-02 12:50:58.000000000 -0200
@@ -58,7 +58,7 @@ unsigned long acpi_wakeup_address = 0;
unsigned long acpi_video_flags;
extern char wakeup_start, wakeup_end;
-extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
+extern unsigned long acpi_copy_wakeup_routine(unsigned long);
static pgd_t low_ptr;
diff -rup linux-2.6.19.1-devel/arch/x86_64/kernel/x8664_ksyms.c linux-2.6.19.1/arch/x86_64/kernel/x8664_ksyms.c
--- linux-2.6.19.1-devel/arch/x86_64/kernel/x8664_ksyms.c 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/arch/x86_64/kernel/x8664_ksyms.c 2007-01-02 12:50:36.000000000 -0200
@@ -34,8 +34,8 @@ EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(clear_page);
#ifdef CONFIG_SMP
-extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
-extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
+extern void __write_lock_failed(rwlock_t *rw);
+extern void __read_lock_failed(rwlock_t *rw);
EXPORT_SYMBOL(__write_lock_failed);
EXPORT_SYMBOL(__read_lock_failed);
#endif
diff -rup linux-2.6.19.1-devel/include/asm-x86_64/hw_irq.h linux-2.6.19.1/include/asm-x86_64/hw_irq.h
--- linux-2.6.19.1-devel/include/asm-x86_64/hw_irq.h 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/include/asm-x86_64/hw_irq.h 2007-01-02 12:51:30.000000000 -0200
@@ -91,7 +91,7 @@ extern void enable_8259A_irq(unsigned in
extern int i8259A_irq_pending(unsigned int irq);
extern void make_8259A_irq(unsigned int irq);
extern void init_8259A(int aeoi);
-extern void FASTCALL(send_IPI_self(int vector));
+extern void send_IPI_self(int vector);
extern void init_VISWS_APIC_irqs(void);
extern void setup_IO_APIC(void);
extern void disable_IO_APIC(void);
diff -rup linux-2.6.19.1-devel/include/asm-x86_64/mutex.h linux-2.6.19.1/include/asm-x86_64/mutex.h
--- linux-2.6.19.1-devel/include/asm-x86_64/mutex.h 2006-12-11 17:32:53.000000000 -0200
+++ linux-2.6.19.1/include/asm-x86_64/mutex.h 2007-01-02 12:49:42.000000000 -0200
@@ -21,7 +21,7 @@ do { \
unsigned long dummy; \
\
typecheck(atomic_t *, v); \
- typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \
+ typecheck_fn(void (*)(atomic_t *), fail_fn); \
\
__asm__ __volatile__( \
LOCK_PREFIX " decl (%%rdi) \n" \
@@ -47,7 +47,7 @@ do { \
*/
static inline int
__mutex_fastpath_lock_retval(atomic_t *count,
- int fastcall (*fail_fn)(atomic_t *))
+ int (*fail_fn)(atomic_t *))
{
if (unlikely(atomic_dec_return(count) < 0))
return fail_fn(count);
@@ -67,7 +67,7 @@ do { \
unsigned long dummy; \
\
typecheck(atomic_t *, v); \
- typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \
+ typecheck_fn(void (*)(atomic_t *), fail_fn); \
\
__asm__ __volatile__( \
LOCK_PREFIX " incl (%%rdi) \n" \
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove fastcall references in x86_64 code.
2007-01-02 21:09 [PATCH] Remove fastcall references in x86_64 code Glauber de Oliveira Costa
@ 2007-01-03 20:13 ` Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2007-01-03 20:13 UTC (permalink / raw)
To: Glauber de Oliveira Costa; +Cc: linux-kernel, akpm
On Tue, Jan 02, 2007 at 07:09:30PM -0200, Glauber de Oliveira Costa wrote:
> Unlike x86, x86_64 already passes arguments in registers.
>...
Nitpick:
In 2.6.20-rc: s/x86/UML on x86/
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:[~2007-01-03 22:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-02 21:09 [PATCH] Remove fastcall references in x86_64 code Glauber de Oliveira Costa
2007-01-03 20:13 ` Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2007-01-02 21:51 Glauber de Oliveira Costa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.