Regparm

Regparm

Post by Jeanette Russ » Thu, 22 Jun 2006 01:55:01



Installed Fedora Core 5 the other day and my SB 16 pnp ISA card was detected
but no joy in the sound department.

In the past I have used OSS drivers and those seemed to work fine.

But they ask in you have Regparm or not I don't have a clue I tried to
search on it but no joy finding out if Fedora core 5 has it or not

Thanks

JR

 
 
 

Regparm

Post by John-Paul Stewar » Thu, 22 Jun 2006 02:34:26



> Installed Fedora Core 5 the other day and my SB 16 pnp ISA card was detected
> but no joy in the sound department.

> In the past I have used OSS drivers and those seemed to work fine.

> But they ask in you have Regparm or not I don't have a clue I tried to
> search on it but no joy finding out if Fedora core 5 has it or not

Try 'zgrep REGPARM /proc/config.gz' (without the quotes).  What does it say?

 
 
 

Regparm

Post by jrus.. » Thu, 22 Jun 2006 05:23:12




> > Installed Fedora Core 5 the other day and my SB 16 pnp ISA card was detected
> > but no joy in the sound department.

> > In the past I have used OSS drivers and those seemed to work fine.

> > But they ask in you have Regparm or not I don't have a clue I tried to
> > search on it but no joy finding out if Fedora core 5 has it or not

> Try 'zgrep REGPARM /proc/config.gz' (without the quotes).  What does it say?

Ok that found nothing but it seems all the newer distros use Regparm
 
 
 

Regparm

Post by Spamles » Thu, 22 Jun 2006 14:35:17



Quote:> Installed Fedora Core 5 the other day and my SB 16 pnp ISA card was detected
> but no joy in the sound department.

> In the past I have used OSS drivers and those seemed to work fine.

> But they ask in you have Regparm or not I don't have a clue I tried to
> search on it but no joy finding out if Fedora core 5 has it or not

In kernel 2.6.17 I think it was finally made the default.
In passing parameters to a function, it passes a few parameters using
the CPU registers. In the kernel .config file it is CONFIG_REGPARM.

The HELP entry when configuring indicates that "gcc [34] gets it right."
I am using Fedora CORE2 with gcc 3.3 so I left it unset (I suppose it
probably works with 3.3 anyway ... is gcc[34], gcc version 3.x and 4.x or
3.4+?)(but, heck, I have been having it unset before and all works ...)

 http://wiki.kernelnewbies.org/LinuxChanges
   x86 32/64
    Make CONFIG_REGPARM enabled by default. With this option, GCC passes the
    first 3 function parameters in registers. It's a noticeable win both for
    size and for performance, and gcc[34] handles it correctly

Various distributions may or may not have turned that on in prior
versions in compiling the kernel. I believe it is a switch one can
use when using gcc
(man gcc: -mregparm=num
          Control how many registers are used to pass integer arguments.
          By default, no registers are used to pass arguments)

So it looks like thit is a question as to how the kernel was compiled.
Passing values in the CPU registers or not?

 
 
 

1. Help! regparm attribute problems (register-passing arguments)

Hello folks:

I am trying to implement regparm attribute on some functions with
register-passing for enhanced performance but  I always get segmentation
fault crashes.  I am using gnu C/C++ 3.2 compiler on Redhat Linux 8.0.

For example,

#define ATTR_REGPARM(n)  __attribute__ ((regparm(n)))

ATTR_REGPARM(1) void func(struct foo *bar)
{
      :

I successfully compiled that but attempted to run it.  I always get
segmentation fault errors.
Also I tried Intel C/C++ 7.0 compiler but it resulted the same.  Does anyone
have more information
about regparm attributes?

Thank you!

-- Tim Stark

2. SANE and generic scsi devices

3. Gcc and regparm

4. 206 PARTIAL CONTENT problem with Apache Webserver