www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/13/06:18:49

Message-Id: <199605131005.GAA13886@delorie.com>
Date: Mon, 13 May 96 12:58:16 LIT
From: Martynas Kunigelis <martynas DOT kunigelis AT VM DOT KTU DOT LT>
Subject: Re: register calling convention
To: "James R. Ashley" <jimrthy AT cowboy DOT net>,
DJGPP mailing list <djgpp AT delorie DOT com>
In-Reply-To: Your message of 11 May 1996 22:52:47 GMT

>
>IMVHO, it's worth it for time critical sections of code in which a big portion
>of the time is spent accessing the stack, if there aren't a lot of params.
>I mean, if you're calling
>
>int RecursiveFunction(int),
>
>then it would be very worthwhile, especially if you're modifying the param as
>you go.  Otherwise, you hae the overhead of saving the parameter each call.
>(Actually, that's from something I've been jiggling with).
>
  Right! Append __attribute__ ((regparm(1))) to the end of declaration and
  there you go. No need to recompile the whole library.

>On the other hand, if you're writing:
>
>char HugeBoWhoppingFunction (int, char*, float, float, ...)
>
>then register calling convention really isn't worth it.
>

Yup, that's why I love GCC, for its unbelieveable flexibility!

Martynas

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019