Available: GCC/GAS Patches for SCO Xenix Dev. Sys.
Ronald S H Khoo
ronald at robobar.co.uk
Sat Mar 24 02:01:41 AEST 1990
In article <1990Mar23.090407.11111 at robobar.co.uk> steve at robobar.co.uk (Steve Bleazard) writes:
[ concerning his GCC port to Xenix ]
Hmm, My proofreading isn't as good as it was :-( One thing that got left out
of the README was:
Behaviour of -m80387 flag is a little non-intuitive. If you specify
-m80387, the symbol __fltused is emitted whether or not floating
point instructions are generated. In this case, floating point
opcodes are generated inline. The correct printf is therefore loaded
and the program works.
If you do _not_ specify -m80387, but you _do_ have floating point
operations in your code, GCC will make calls to routines in its
gnulib, which themselves cause __fltused to be required, and again,
all works OK, albeit a little slower.
If, however, -m80387 is NOT specified and you DON'T have any
floating operations which call gnulib floating ops, then the
non-float compatible printf will be loaded, and the program
won't work.
Example:
% cat x.c
main()
{
printf("%f\n", 1.0);
}
% gcc x.c
% ./a.out
f
% gcc -m80387 x.c
% ./a.out
1.000000
So, if you need to print floating point numbers, you _may_ need to say
-m80387. You might as well say -m80387 ANYWAY. The cost is about
5k if you don't have any float stuff (peanuts!). This will be the
default if you #define TARGET_DEFAULT to 1 in tm.h (config/tm-xenix386.h)
In this case, -msoft-float will force the use of gnulib and not emit __fltused.
Ho Hum.
--
Eunet: Ronald.Khoo at robobar.Co.Uk Phone: +44 1 991 1142 Fax: +44 1 998 8343
Paper: Robobar Ltd. 22 Wadsworth Road, Perivale, Middx., UB6 7JD ENGLAND.
More information about the Comp.unix.xenix
mailing list