This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: conditional registers per function, possible or not?
- To: Dylan_S_Cuthbert at hq dot scei dot sony dot co dot jp
- Subject: Re: conditional registers per function, possible or not?
- From: Andi Kleen <ak at suse dot de>
- Date: 22 Jun 2000 17:37:52 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <49256906.00424D90.00@hq.scei.sony.co.jp>
Dylan_S_Cuthbert@hq.scei.sony.co.jp writes:
> I didn't get a response to my last question along these lines:
>
> Is it at all possible within the current gcc frame work to be able to use
> conditional registers selected on a per function basis?
>
> Something like this perhaps:
>
> int SpecialFunction( ) __attribute__ ((registers_begin( $8))) __attribute__
> ((registers_end( $20)));
>
> Ideas?
Linux kernel does this sometimes. It just uses an asm with the appropiate
clobbers and codes the function call in inline assembler.
Disadvantage: not schedulable
-Andi