delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: djgpp, nasm and floats |
Date: | 22 Apr 2002 16:51:49 GMT |
Organization: | Aachen University of Technology (RWTH) |
Lines: | 21 |
Message-ID: | <aa1f35$e2g$1@nets3.rz.RWTH-Aachen.DE> |
References: | <4 DOT 3 DOT 2 DOT 7 DOT 2 DOT 20020422131623 DOT 00bd4110 AT mail DOT ciudad DOT com DOT ar> |
NNTP-Posting-Host: | acp3bf.physik.rwth-aachen.de |
X-Trace: | nets3.rz.RWTH-Aachen.DE 1019494309 14416 137.226.32.75 (22 Apr 2002 16:51:49 GMT) |
X-Complaints-To: | abuse AT rwth-aachen DOT de |
NNTP-Posting-Date: | 22 Apr 2002 16:51:49 GMT |
Originator: | broeker@ |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
R. Grela <rgrela AT ciudad DOT com DOT ar> wrote: > extern "C" float atest(); > void main() { float f = atest(); cout << f << endl; } You had best execute a little test compilation to investigate what the DJGPP C calling convention says about returning floats or doubles from a function. I.e.: write a little example in C, and 'gcc -S' it to see what the parameter passing looks like: The example source could be atest.c: float atest(float a) { return a+5; | Using "gcc -S" on this will then give you (AT&T style) assembly code in atest.s that you can inspect. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |