Commit graph

8 commits

Author SHA1 Message Date
Elliott Hughes
2f1a7b9852 Let clang generate most of our assembler for x86/x86-64 too.
It looks like the only functions current clang can't do are the lrint
family. Everything else looks good, and the fact that clang has builtins
means we shouldn't normally see calls to any of these functions anyway.

Test: llvm-objdump
Change-Id: I65b4da96b6c9b10f01cb54a7ebd1de5934ba4488
2023-02-07 01:22:29 +00:00
Elliott Hughes
a0faeb299d Remove remaining "ASCII binary blobs".
We stopped accepting new code in this form (compiler output from
compilers we don't have compiling source we don't have [or possibly the
same source we do have --- how would be know?]) years ago, but never
went back to clean up existing instances.

This doesn't affect the string/memory routines, which are intelligible,
nor all of the libm stuff (we're keeping the intelligible subset), but
does affect all the trig functions.

The right way to do this is to either have commented hand-written
assembler (which we have always taken, and will continue to take) or to
have C/C++ source that can be built with LLVM (which will then be built
as part of the regular build). This is what we do for arm/arm64, for
example, with the C/C++ source coming from
https://github.com/ARM-software/optimized-routines and being mirrored
in external/arm-optimized-routines, and built by Android's clang at
build time.

Test: treehugger
Change-Id: Icd69ef34b8a9ea16ea2b7d5d6587c2a9143b7740
2022-11-18 20:15:40 +00:00
Stephen Hines
c68ec152d1 Fix issues with .note.GNU-stack section directives.
bionic/libm/x86_64/s_log1p.S:809:2: error: changed section type for .note.GNU-stack, expected: 0x1
 .section .note.GNU-stack, ""
 ^

These assembly sources are missing @progbits to set the section flags
correctly. Without it, they end up denoting a different section type. By
adding the @progbits explicitly, we see the same section flags with
readelf.

[ 4] .note.GNU-stack   PROGBITS        0000000000000000 000593 000000 00      0   0  1

Bug: http://b/155835175
Test: m for aosp_x86_64
Change-Id: Ifff35d35f5f9ded5938e88677b18805809820e9f
2020-08-21 12:17:12 -07:00
Elliott Hughes
ef14a89f72 libm: remove unused x86/x86_64 assembler.
Test: treehugger
Change-Id: Icefa51fe2d204f0ad5700fd67649a1d4b1e6a38f
2019-08-27 09:16:12 -07:00
Elliott Hughes
dfb74c5f59 Minor copyright header unification.
Regenerating the NOTICE file the other day left me scratching my head at
various "how do they differ?" cases, resolved by this patch.

Test: N/A
Change-Id: I4230bfa1d7ec842a4b9fb8c73dd3b39443d74054
2016-10-24 12:57:55 -07:00
jzha136
f3ea093ebb Add x86 optimization of rint functions and tests
Change-Id: I5e7696ff9bcb1efc2625100ef8565b68dca2326c
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
2016-03-07 18:31:26 -08:00
Jingwei Zhang
5d4f0e6a26 Add the optimized implementation of 18 math functions for x86 and x86_64 respectively
Change-Id: I31bf601448a9427f825517f3a0ff24de47f49bfa
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
2015-03-09 13:19:08 -07:00
James Rose
45789b63db libm: Add hardware sqrt, ceil, floor and trunc for x86 & x86_64
Add hardware implementations for sqrt, ceil, floor and trunc for
x86 and x86_64. These routines, and in particular sqrt are much
faster than the BSD C language versions of these functions.

Fixed whitespace errors.

Revised x86 versions with respect to alignment.
Rebased for Android 5.0

Change-Id: I86bdb520ce5e589b0cf63778f353fbd3263c8f0e
Author: James Rose <james.rose@intel.com>
Signed-off-by: James Rose <james.rose@intel.com>
2015-03-06 16:48:30 -08:00