Re: Mixing hard and soft floating point?
From: Wolfgang Denk <hidden>
Date: 2009-10-18 13:10:06
Dear Joakim Tjernlund, In message [ref] you wrote:
quoted
If the application is really using FP instructions a lot, then there is a huge difference between using soft-float and MATH_EMU; I remember test cases where soft-float was faster by factors of 500...1000.Ouch, I had no idea that it could be that much.
Well, consider really simple operations, like FP add or similar, and
compare the library code for the soft-FP implementationagainst the
cost for a trap into the kernel. Or even worse - a consider simple
assignment ("float x, foo; x = foo"); with soft-float: "lis 9,x@ha;
stw 3,x@l(9)" = 2 instructions, with MATH_EMU "lis 9,x@ha; stfs
1,x@l(9)" = 1 insn plus a kernel trap.
For real numbers, run a benchmark that models your real use case.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Little known fact about Middle Earth: The Hobbits had a very sophi-
sticated computer network! It was a Tolkien Ring...