By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 1,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

Borland C++ direct fpu commands

P: n/a
Hello everyone,

i'm not very familiar with the insides of c++, i prefer asm... but
unfortunately i'm in need for some c-help.
(compiler switch, rewritten math.h or something)

for the following c stuff the borland c compiler creates something like
this:
C: double x = cos(value);
EXE: push value
call _cos
fstp x

the MS Visual C Compilere does this:
EXE: fld value
fcos
fstp x

So MS Visual C is much faster and does not require an external _cos
funktion. But as I'm bound to the omf obj and lib file structure i require
the borland compiler to compile the c code.
.... is it anyhow possible to get borland to compile the same???? i dislike
the use of the huge (1,3 MB) standard dll library just for using some simple
cos, sin functions

thanks,

Wolfgang Tischer
Jul 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Wolfgang Tischer wrote:
[skip]
So MS Visual C is much faster and does not require an external _cos
funktion. But as I'm bound to the omf obj and lib file structure i require
the borland compiler to compile the c code.
... is it anyhow possible to get borland to compile the same???? i dislike
the use of the huge (1,3 MB) standard dll library just for using some simple
cos, sin functions


Well. There is always the possibility that you write the assembler code directly
in the source code. Discover the 'asm' statement and how it is used in your
compiler. Other then that you should ask in a Borland newsgroup, since compiler
switches are not discussed here (It could be that there is some switch that directs
the compiler in the way you want it to)

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #2

P: n/a
Wolfgang Tischer wrote:
i'm not very familiar with the insides of c++, i prefer asm... but
unfortunately i'm in need for some c-help.


For C you should use comp.lang.c, but your question seems compiler-
specific, and as such should be asked in the compiler-specific newsgroup.

I recommend borland.public.cpp.language

V
Jul 23 '05 #3

P: n/a
"Wolfgang Tischer" <yt*******@gmx.de> wrote in message
news:cu*************@news.t-online.com...
So MS Visual C is much faster and does not require an external _cos
funktion. But as I'm bound to the omf obj and lib file structure i require
the borland compiler to compile the c code.


This might not help, but there was a tool called OMFCVT that shipped with
the Paradigm debugger and allowed me to compile with MSC 6. I don't know if
it'll work with Pentium. I'd probably just use inline assembler.
Jul 23 '05 #4

P: n/a
Borland ships tools to convert from COFF to OMF with their compiler.

Nathaniel L. Walker

"Wolfgang Tischer" <yt*******@gmx.de> wrote in message
news:cu*************@news.t-online.com...
Hello everyone,

i'm not very familiar with the insides of c++, i prefer asm... but
unfortunately i'm in need for some c-help.
(compiler switch, rewritten math.h or something)

for the following c stuff the borland c compiler creates something like
this:
C: double x = cos(value);
EXE: push value
call _cos
fstp x

the MS Visual C Compilere does this:
EXE: fld value
fcos
fstp x

So MS Visual C is much faster and does not require an external _cos
funktion. But as I'm bound to the omf obj and lib file structure i require
the borland compiler to compile the c code.
... is it anyhow possible to get borland to compile the same???? i dislike
the use of the huge (1,3 MB) standard dll library just for using some simple cos, sin functions

thanks,

Wolfgang Tischer

Jul 23 '05 #5

P: n/a
"Mike Jolley" <mi**@wmsgaming.com> schrieb im Newsbeitrag
news:vB*****************@newssvr17.news.prodigy.co m...
"Wolfgang Tischer" <yt*******@gmx.de> wrote in message
news:cu*************@news.t-online.com...
So MS Visual C is much faster and does not require an external _cos
funktion. But as I'm bound to the omf obj and lib file structure i require the borland compiler to compile the c code.
This might not help, but there was a tool called OMFCVT that shipped with
the Paradigm debugger and allowed me to compile with MSC 6. I don't know

if it'll work with Pentium. I'd probably just use inline assembler.


is it able to convert the name mangling?
Jul 23 '05 #6

P: n/a
"Nathaniel L. Walker" <NatLWalker@no_email.org> schrieb im Newsbeitrag
news:cu**********@cognac.ucs.louisiana.edu...
Borland ships tools to convert from COFF to OMF with their compiler.


yes, but they work just on libs which do not contain real code (just
function call specifications)... but this is realy offtopic now ;-)
Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.