Should I turn MATH_EMULATE back on?

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Mar 7 12:04:01 PST 2004


On Sun, Mar 07, 2004 at 07:07:54PM +0000, Mark wrote:
> This is weird. I installed Perl 5.8.2_5 on a clean FreeBSD 4.9R-p3 box, and
> got an error on Time::Hires.

> Does Hires use a math co-processor? The only difference with the kernel I
> ran yesterday, is that I commented out this:
> 
> # options    MATH_EMULATE
> 
> On an AMD XP-2200; as I take it it has the co-processor. Still, could that
> be what is causing Hires to fail? More importantly, should I turn
> MATH_EMULATE back on for the AMD?

Well, I have MATH_EMULATE commented out in my kernel config, and
Time::Hires works perfectly well for me.  This is with:

    % pkg_info -I perl-\*
    perl-5.8.2_5        Practical Extraction and Report Language

MATH_EMULATE applies to very early models in the x86 series where the
FPU wasn't always built into the chip.  I think the last models where
that was true were some of the 486 chips.  Certainly pentium class or
better x86 chips (ie. anything introduced in the last ten years or so)
have all had built in FPUs.  That includes everything built by AMD as
well.

However, I'm running a non-threaded perl: I suspect that may be the
root cause of your problem.  Just a few wild guesses here: did you
recently reinstall perl changing from non-threaded to threaded?  Do
you have perl modules still around which were compiled under the
non-threaded perl?  Or perhaps you've compiled perl using higher than
normal optimization settings, or gcc33 instead of the default
compiler:

    % perl -V:cc
    % perl -V:gccversion
    % perl -V:optimize

will show you what was used.  As with the kernel, turning on the
higher levels of optimization does not necessarily make things run
faster, and may well stop things running correctly at all.

	Cheers,

	Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040307/e206a842/attachment.bin


More information about the freebsd-questions mailing list