delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/11/23:38:59

Xref: news2.mv.net comp.os.msdos.djgpp:3707
From: "James R. Ashley" <jimrthy AT cowboy DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: register calling convention
Date: 11 May 1996 22:52:47 GMT
Organization: Lenape Information Systems
Lines: 29
Message-ID: <4n35nv$jmu@ns.cowboy.net>
NNTP-Posting-Host: ppp22.cowboy.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Martynas Kunigelis <martynas DOT kunigelis AT VM DOT KTU DOT LT> writes:
> 

> OK, I hope to hear opinions if regparm convention is really worth implementing
> it.... x86 really has so few registers.
> 
> Martynas

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).

On the other hand, if you're writing:

char HugeBoWhoppingFunction (int, char*, float, float, ...)

then register calling convention really isn't worth it.

Personally, I think anything where the register calling convention is worth
implementing is worth doing in asm.

Just my $.02 worth (which is actually worth a lot less)
jimerthy

- Raw text -


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