Xref: news2.mv.net comp.os.msdos.djgpp:3377 From: alexlehm AT rbg DOT informatik DOT th-darmstadt DOT de (Alexander Lehmann) Newsgroups: comp.os.msdos.djgpp Subject: Re: register calling convention Date: 2 May 1996 16:37:22 GMT Organization: Technische Hochschule Darmstadt Lines: 33 Message-ID: <4maoc3$o8g@rs18.hrz.th-darmstadt.de> References: <199605021311 DOT NAA26091 AT aux DOT epita DOT fr> NNTP-Posting-Host: hp62.rbg.informatik.th-darmstadt.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp frank denis (Frank DOT Denis AT epita DOT fr) 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 libc when I : added -mrtd and -mregparm=3. Using __attribute__ ((__stdcall__)) for my own : functions also cause an exception, although __regparm__ works fine. May : someone help me produce the fastest possible code with DJGPP ? Well, just recompiling the library souce code may not be sufficient to make register calling available. Most of the assember parts would have to be fixed, (though I'm not sure how much that actually is). If you are not using any functions that call your own functions back from lib functions (e.g. qsort or signal), it may also be possible to just fix up the include headers to call all lib functions with __stdcall__. At any rate, fixing the library for different calling conventions is a highly non-trivial task that probably should be coordinated with the djgpp developers, so that you don't have to redo it everytime a new version of the lib gets released. bye, Alexander -- Alexander Lehmann, | "On the Internet, alex AT hal DOT rhein-main DOT de (plain, MIME, NeXT) | nobody knows alexlehm AT rbg DOT informatik DOT th-darmstadt DOT de (plain) | you're a dog."