Re: pointer to an asmlinkage function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 11, 2003 at 11:11:02AM +0200, chgans@tuxfamily.org wrote:

> But how does the compiler know that this call is to be done with "asmlinkage"
> (regparm(...)) technique?

This is a good question, that I've struggled with in the past. I don't
have a definitive answer, but I can tell you two things: 

1. Declaring the function pointer as asmlinkage causes some gcc
versions to croak. 

2. The compiler empirically always does the right thing. This *might* be
because passing parameters in registers is an optimization, and the
compiler will not optimize function calls through a function pointer. 

If you find a definitive answer, I'd like to know. 

Thanks, 
muli. 
-- 
Muli Ben-Yehuda
http://www.mulix.org
http://www.livejournal.com/~mulix/

Attachment: pgp00444.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux