delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/10/22:11:03

From: "Ian Mausolus" <mausolus AT ican DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: register based calling
Date: 10 Mar 1997 16:54:33 GMT
Organization: ACC TelEnterprises Ltd.
Lines: 15
Message-ID: <01bc2d73$36c37780$1bb0f8ce@pquinney>
NNTP-Posting-Host: ppp-027.toronto-01.ican.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The problem with regparm is that it isn't flexible at all!  (For example
you neither can't specifiy the order of the registers, you can't use just
any registers, and you can only use 3 ot them!).  Having to "mov" around
registers within the function itself to compensate for regparm's
inflexibility (manually in Assembly and automatically by the C compiler)
defeats the purpose of avoiding the stack pop/pushes.  Besides, regparm
doesn't solve the problem of ragister based return values (unless there is
a function modifier for that tat I havn't heard of)!  

Watcom C/C++ does a perfect job as far as using registers "between"
functions goes -- does anyone know of a way we could get perfect register
based calling flexibility in DJGPP??  Maybe there is something we can write
ourselves which will handle register based calling properly?

I. Mausolus

- Raw text -


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