From owner-freebsd-alpha Thu Jul 27 8:12:48 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 30D6137B9AC for ; Thu, 27 Jul 2000 08:12:45 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id LAA23631 for ; Thu, 27 Jul 2000 11:12:43 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.9.3/8.9.1) id LAA69872; Thu, 27 Jul 2000 11:12:43 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 27 Jul 2000 11:12:43 -0400 (EDT) To: freebsd-alpha@freebsd.org Subject: Using the Compaq Math lib natively X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14720.19316.592646.531221@grasshopper.cs.duke.edu> Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Compaq has a math library that they've put out for linux. Its available from http://www.compaq.com/math/introduction/index.html I started looking at it while doing the linux/alpha emulation work. I noticed that it contains no system calls. It has external references to libots (another compaq lib). Between libots and libcpml, only 2 external symbols are referenced: U __errno_location U __ieee_get_fp_control I think that we might be able to use libcpml & libots natively if we wrap them with another library to provide those 2 symbols. To test the theory, I built bladenc, added 'int __errno_location, __ieee_get_fp_control;' to one of the C files and linked with libcpml. The resulting binary ran (I guess I didn't take any exceptionsl phew!), produced a playable mp3, and was about 43% faster than a binary linked with our libm. Here's a table of the total time taken to produce an mp3 from a 1:40 .wav file given a variety of bladenc binaries on a 600MHz UP1000 (600MHz 21264a, 2MB L2 cache). For comparison, a 733MHz PIII Xeon takes about 45.47 for the same file (using the gcc from 4.0-RELEASE). Linux ccc / libcpml: 29.61 FreeBSD gcc/ libcpml: 42.51 FreeBSD gcc/ libm: 53.93 Does anybody know where to find a description of ieee_get_fp_control() and errno_location()? The RH 6.2 linux/alpha box I set up doesn't seem to have a man page for ieee_get_fp_control().., but it seems to be in the libc. Is the source available somehow for the libc.a from RH6.2? Also, I haven't examined cxml yet. I imagine that this will be usable as well. (cxml used to be called DXML and has BLAS, LAPACK, and other useful math bits in it). Cheers, Drew ------------------------------------------------------------------------------ Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin Duke University Email: gallatin@cs.duke.edu Department of Computer Science Phone: (919) 660-6590 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message