Support for hardware SQRT instruction

Description

After watching a debate on the Harmony list about Math.sqrt performance I've implemented support for hardware SQRT via a VM_Magic. There's a noticeable speedup for a micro-benchmark (Math.sqrt in a tight loop), but nothing detectable in any real benchmarks I can find. On the other hand, benchmarks like scimark2's MonteCarlo explicitly structure their computation to avoid doing a sqrt "because it's so slow", so why not commit it.

Question: On Intel I've only implemented the SSE2 version, so when to use hardware sqrt is clear. On PowerPC, I've looked at lists of which processors support it and which ones don't, I can't tell whether we care about any of the ones that don't. Should I add a build option to disable hardware square root, or are such chips obsolete ?

Environment

None

Assignee

Robin Garner

Reporter

Robin Garner

Labels

None

Fix versions

Priority

Low
Configure