svn commit: r336739 - head/lib/libc/powerpcspe/gen
Justin Hibbits
jhibbits at FreeBSD.org
Thu Jul 26 14:42:21 UTC 2018
Author: jhibbits
Date: Thu Jul 26 14:42:20 2018
New Revision: 336739
URL: https://svnweb.freebsd.org/changeset/base/336739
Log:
Fix fabs(3) for powerpcspe, this time for real
SPE ABI uses the soft-float ABI, which splits doubles into two words. As such,
fabs(3) cannot work on a double directly. It's too costly to convert the
argument pair into a single double to use efdabs, so clear the top bit of the
high word, which is the sign bit.
Modified:
head/lib/libc/powerpcspe/gen/fabs.S
Modified: head/lib/libc/powerpcspe/gen/fabs.S
==============================================================================
--- head/lib/libc/powerpcspe/gen/fabs.S Thu Jul 26 14:15:04 2018 (r336738)
+++ head/lib/libc/powerpcspe/gen/fabs.S Thu Jul 26 14:42:20 2018 (r336739)
@@ -31,7 +31,8 @@ __FBSDID("$FreeBSD$");
* double fabs(double)
*/
ENTRY(fabs)
- efdabs %r3,%r3
+ /* arg is split in two words, clear sign bit only, in r3. */
+ clrlwi %r3,%r3,1
blr
END(fabs)
More information about the svn-src-all
mailing list