linux-mips
[Top] [All Lists]

Floating-point questions

To: linux-mips <linux-mips@linux-mips.org>
Subject: Floating-point questions
From: Karl Lessard <klessard@sunrisetelecom.com>
Date: Thu, 06 Jan 2005 14:37:36 -0500
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5
Hi all,

I just want to make sure that I understand correctly the behavior of floating-points on systems without
FPU.  There is 2 way for doing floating-point operations:

The first is to let the CPU generate exceptions on a FP operation call , which are handl e by the kernel that do the job in software,
using integers only.

The second is to build your app using the -msoft-float compilation flag, making GCC to convert itself the FP operations
to integer operations, using its own libraries.

Also, I've test the both methods with simple float operations, and I figured suprisingly that the first method is a bit
faster (I though the overhead would have been larger than the second one).

Do I miss something? Is there anything I can do to optimize significantly float operations?

Thanks a lot,
Karl

<Prev in Thread] Current Thread [Next in Thread>
  • Floating-point questions, Karl Lessard <=