delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/04/05:53:28

Xref: news2.mv.net comp.os.msdos.djgpp:3422
From: Shawn Hargreaves <slh100 AT york DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: register calling convention
Date: Fri, 3 May 1996 10:27:15 +0100
Organization: The University of York, UK
Lines: 29
Message-ID: <Pine.SGI.3.91.960503101106.21607A-100000@tower.york.ac.uk>
NNTP-Posting-Host: tower.york.ac.uk
Mime-Version: 1.0
In-Reply-To: <199605021311.NAA26091@aux.epita.fr>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 2 May 1996, frank denis wrote:

> Hello ! In a previous mail, our friend Eli Zaretskii said :
> Use the -mregparm=n (where n is a number [1..3]).  Look it up in the GCC
> docs.  Note that you will have to rebuild the libraries you use (including
> the libraries which come with DJGPP) with that same switch to be
> consistent with that parameter-passing mechanism. 
> 
>   May someone recompile these libraries and make them available for 
> everyone on a ftp ? I tried but all the programs crashed with the new 

It's unfortunately not as simple as just recompiling libc, because if you 
change the calling convention you will have to alter all the asm code 
that uses it. There is quite a bit of asm code in libc (off the top of my 
head, all the _dpmi_* wrapper functions take parameters on the stack), so 
converting it to the register calling convention would be a non-trivial 
task.

I'm also unsure how much speed increase you would get. The 80x86 has so 
few registers, if you pass parameters in them the compiler is going to 
have to push other things onto the stack instead, to make room...


/*
 *	Shawn Hargreaves.        Why is 'phonetic' spelt with a ph?
 *	Check out Allegro and FED on http://www.york.ac.uk/~slh100/
 */


- Raw text -


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