Borland C++ direct fpu commands

W

Wolfgang Tischer

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
 
K

Karl Heinz Buchegger

Wolfgang said:
[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)
 
V

Victor Bazarov

Wolfgang said:
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
 
M

Mike Jolley

Wolfgang Tischer said:
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.
 
N

Nathaniel L. Walker

Borland ships tools to convert from COFF to OMF with their compiler.

Nathaniel L. Walker
 
W

Wolfgang Tischer

Nathaniel L. Walker said:
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 ;-)
 
W

Wolfgang Tischer

Mike Jolley said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top