summaryrefslogtreecommitdiffstats
path: root/newlib/libc/machine
Commit message (Collapse)AuthorAgeFilesLines
* Add rawmemchrWilco Dijkstra2016-05-204-2/+118
| | | | | | | | | | | | | | | | | | | | | | | Marcus Shawcroft wrote: > This patch appears to have been munged by the mail system, can you > repost as an attachment please. Sure, I've attached the patch. Wilco Add a simple rawmemchr implementation. Use strlen for rawmemchr(s, '\0') as it is the fastest way to search for '\0', and use memchr with an infinite size for other cases. This is 3x faster for large sizes. ChangeLog: 2016-04-22 Wilco Dijkstra <wdijkstr@arm.com> * newlib/libc/machine/aarch64/Makefile.in: Add rawmemchr.S and rawmemchr-stub.c. * newlib/libc/machine/aarch64/Makefile.am: Likewise. * newlib/libc/machine/aarch64/rawmemchr.S (rawmemchr): Add rawmemchr. * newlib/libc/machine/aarch64/rawmemchr-stub.c (rawmemchr): Likewise.
* Fix strlen using Thumb-2 with -Os -marmJeff Johnston2016-05-112-4/+10
| | | | | | | | | 2016-04-18 Thomas Preud'homme <thomas.preudhomme@arm.com> * libc/machine/arm/strlen-stub.c: Check capabilities of architecture to decide which Thumb implementation to use and fall back to C implementation for architecture not supporting Thumb mode. * libc/machine/arm/strlen.S: Likewise.
* BSD compatibility for <machine/endian.h>Sebastian Huber2016-04-191-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce <machine/_endian.h> to let target based customization of <machine/endian.h> via * _LITTLE_ENDIAN, * _BIG_ENDIAN, * _PDP_ENDIAN, and * _BYTE_ORDER. defines. Add definitions expected by FreeBSD to <machine/endian.h> like * _QUAD_HIGHWORD, * _QUAD_LOWWORD, * __bswap16(), * __bswap32(), * __bswap64(), * __htonl(), * __htons(), * __ntohl(), and * __ntohs(). Also, if __BSD_VISIBLE * LITTLE_ENDIAN, * BIG_ENDIAN, * PDP_ENDIAN, and * BYTE_ORDER. Targets that define __machine_host_to_from_network_defined in <machine/_endian.h> must provide their own implementation of * __htonl(), * __htons(), * __ntohl(), and * __ntohs(), otherwise a default implementation is provided by <machine/endian.h>. In case of GCC defines to builtins are used. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Use __machine_*_t_defined for internal typesSebastian Huber2016-04-152-6/+6
| | | | | | | | | | | | | | | | | | | | | | Newlib defines defaults for internal types via <sys/_types.h> and uses <machine/_types.h> to let targets define their own type if necessary. Previously for example #ifndef __dev_t_defined typedef short __dev_t; #endif However, the __*_t_defined pattern conflicts with the glibc type guard pattern for user types, e.g. dev_t in this example. Introduce a __machine_*_t_defined pattern for internal types (defined by <machine/_types.h>, used by <sys/_types.h>). For example #ifndef __machine_dev_t_defined typedef short __dev_t; #endif Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
* Add Intel MCU targetIgor Venevtsev2016-04-048-2/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel MCU System V ABI are incompartible with i386 System V ABI: o Minimum instruction set is Intel Pentium ISA minus x87 instructions o No x87 or vector registers o First three args are passed in %eax, %edx and %ecx o Full specification available here: https://github.com/hjl-tools/x86-psABI/wiki/iamcu-psABI-0.7.pdf newlib/ * configure.host: Add new ix86-*-elfiamcu target newlib/libc/include/ * setjmp.h: Change _JBLEN for Intel MCU target newlib/libc/machine/i386/ * memchr.S: (memchr) Target-specific size-optimized version * memcmp.S: (memcmp) Likewise * memcpy.S: (memcpy) Likewise * memmove.S: (memmove) Likewise * memset.S: (memset) Likewise * setjmp.S: (setjmp) Likewise * strchr.S: (strchr) Likewise * strlen.S: (strlen) Likewise newlib/libc/stdlib/ * srtold.c: (__flt_rounds) Disable for Intel MCU
* Bump up newlib version to 2.4.0 due to feature test refactoringnewlib-2_4_0Jeff Johnston2016-03-2956-566/+566
|
* Add simple versions of random() and srandom()Joel Sherrill2016-03-281-17/+0
| | | | | | | | | | | | | Prototypes also added for initstate() and setstate() but they were not implemented in the shared newlib code. * newlib/libc/include/cygwin/stdlib.h: Prototypes added. * winsup/cygwin/include/cygwin/stdlib.h: Prototypes removed. * newlib/libc/stdlib/random.c: New file. * newlib/libc/machine/epiphany/machine/stdlib.h: Removed * newlib/libc/stdlib/Makefile.am: Added random.c. * newlib/libc/stdlib/stdlib.tex: Added random.def. * newlib/libc/stdlib/Makefile.in: Regenerated.
* epiphany/machine/stdlib.h: Disable epiphany unique random wrappers for RTEMSJoel Sherrill2016-03-221-0/+2
|
* Enable HW interrupt setup on x86/x86_64 systems by defaultnewlib-snapshot-20160226Corinna Vinschen2016-02-262-2/+2
| | | | | | | | | | | | | * configure.host: Define _I386MACH_DISABLE_HW_INTERRUPTS on rdos. Remove setting _I386MACH_ALLOW_HW_INTERRUPTS anywhere else. * libc/machine/i386/i386mach.h: Replace test for _I386MACH_ALLOW_HW_INTERRUPTS with test for !_I386MACH_DISABLE_HW_INTERRUPTS. * libc/machine/x86_64/x86_64mach.h: Ditto. * libc/sys/linux/machine/i386/i386mach.h: Ditto. * libm/machine/i386/i386mach.h: Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix memcpy bug that reads past end of buffer.Steve Ellcey2016-01-281-1/+1
| | | | | * libc/machine/mips/memcpy.S (memcpy): Fix read past end of input.
* Make macro checks ARMv8-M baseline proofThomas Preud'homme2016-01-284-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libgloss: * arm/Makefile.in: Add newlib/libc/machine/arm to the include path if newlib is present. * arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macros __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * arm/crt0.S: Use THUMB1_ONLY rather than __ARM_ARCH_6M__, !__ARM_ARCH_ISA_ARM rather than THUMB_V7M_V6M for fp enabling, and PREFER_THUMB rather than THUMB_V7_V6M. Rename other occurences of THUMB_V7M_V6M to THUMB_VXM. * arm/linux-crt0.c: Likewise. * arm/redboot-crt0.S: Likewise. * arm/swi.h: Likewise. * arm/trap.S: Likewise. newlib: * libc/machine/arm/memcpy-stub.c: Use ACLE macros __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to check for Thumb-2 only targets rather than __ARM_ARCH and __ARM_ARCH_PROFILE. * libc/machine/arm/memcpy.S: Likewise. * libc/machine/arm/setjmp.S: Likewise for Thumb-1 only target and include acle-compat.h. * libc/machine/arm/strcmp.S: Likewise for Thumb-1 and Thumb-2 only target and include acle-compat.h. * libc/sys/arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macro __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * libc/sys/arm/crt0.S: Use PREFER_THUMB rather than THUMB_V7_V6M and rename THUMB_V7M_V6M into THUMB_VXM. * libc/sys/arm/swi.h: Likewise.
* Regenerate files for newlib 2.3.0.newlib-2_3_0Jeff Johnston2015-12-2158-786/+889
|
* ARC: Use new definitions for optional ARC CPU featuresAnton Kolesov2015-12-1723-69/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC for ARC has been updated to provide consistent naming of preprocessor definitions for different optional architecture features: * __ARC_BARREL_SHIFTER__ instead of __Xbarrel_shifter for -mbarrel-shifter * __ARC_LL64__ instead of __LL64__ for -mll64 * __ARCEM__ instead of __EM__ for -mcpu=arcem * __ARCHS__ instead of __HS__ for -mcpu=archs * etc (not used in newlib) This patch updates assembly routines for ARC to use new definitions instead of a deprecated ones. To ensure compatibility with older compiler new definitions are also defined in asm.h if needed, based on deprecated preprocessor definitions. *** newlib/ChangeLog *** 2015-12-15 Anton Kolesov <Anton.Kolesov@synopsys.com> * libc/machine/arc/asm.h: Define new GCC definition for old compiler. * libc/machine/arc/memcmp-bs-norm.S: Use new GCC defines to detect processor features. * libc/machine/arc/memcmp.S: Likewise. * libc/machine/arc/memcpy-archs.S: Likewise. * libc/machine/arc/memcpy-bs.S: Likewise. * libc/machine/arc/memcpy.S: Likewise. * libc/machine/arc/memset-archs.S: Likewise. * libc/machine/arc/memset-bs.S: Likewise. * libc/machine/arc/memset.S: Likewise. * libc/machine/arc/setjmp.S: Likewise. * libc/machine/arc/strchr-bs-norm.S: Likewise. * libc/machine/arc/strchr-bs.S: Likewise. * libc/machine/arc/strchr.S: Likewise. * libc/machine/arc/strcmp-archs.S: Likewise. * libc/machine/arc/strcmp.S: Likewise. * libc/machine/arc/strcpy-bs-arc600.S: Likewise. * libc/machine/arc/strcpy-bs.S: Likewise. * libc/machine/arc/strcpy.S: Likewise. * libc/machine/arc/strlen-bs-norm.S: Likewise. * libc/machine/arc/strlen-bs.S: Likewise. * libc/machine/arc/strlen.S: Likewise. * libc/machine/arc/strncpy-bs.S: Likewise. * libc/machine/arc/strncpy.S: Likewise. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
* [ARM] Adjust strcmp-armv7.S selection logic.Marcus Shawcroft2015-11-233-3/+35
| | | | | | Reformulate the strcmp-armv7.S selection logic around the architecture features required by the implementation code rather (some) version of the architecture that expose those features.
* [ARM] Factor out the thumb2 -Os implementation.Marcus Shawcroft2015-11-233-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch moves the inline ASM thumb2 -Os implementation out into its own .S file. Tested by building newlib and comparing libc.a binaries before and after for all permutations of: Architectures: armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2 ISAs: thumb arm Optimization Levels: Os O2 Excluding: armv6s-m -mthumb armv6-m -mthumb armv6zk -mthumb armv6z -mthumb armv6k -mthumb armv6j -mthumb
* Import correctly working strtold from David M. Gay.Corinna Vinschen2015-11-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add strtodg.c and strtorx.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/strtodg.c: New file implementing generic string to long double conversion. * libc/stdlib/strtorx.c: New file, implementing IEEE format string to long double conversion. * libc/stdlib/mprec.h (_strtodg_r): Declare. (_strtorx_r): Declare. * libc/stdlib/gdtoa.h (__UShort): Define. * libc/stdlib/strtold.c (__flt_rounds): Define for i386 and x86_64 target. (FLT_ROUNDS): Define, as 0 on platforms missing a __flt_rounds function. (_strtold_r): Converted from strtold. Call _strtorx_r on targets supporting distinct long doubles. (strtold): Just call _strtold_r. * libc/include/stdlib.h (_strtold_r): Declare. * libc/stdlib/ldtoa.c (_strtold): Comment out. Explain why. * libc/stdio/vfscanf.c (__SVFSCANF_R): Call _strtold_r instead of _strtold. * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto. * common.din (strtold): Drop redirection to _strtold. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* [ARM] Factor out the thumb1 -Os implementation.cygwin-2_3_1-releasecygwin-2_3_1-relaseMarcus Shawcroft2015-11-133-15/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch moves the inline ASM thumb1 -O2 implementation out into its own .S file. Tested by building newlib and comparing libc.a binaries before and after for all permutations of: Architectures: armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2 ISAs: thumb arm Optimization Levels: Os O2 Excluding: armv6s-m -mthumb armv6-m -mthumb armv6zk -mthumb armv6z -mthumb armv6k -mthumb armv6j -mthumb
* [ARM] Adding strlen.SMarcus Shawcroft2015-11-135-29/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds strlen.S to contain the complementary preprocessor logic to strlen-stub.c intended to provide #inclusion of alternative .S implementations. Initially we just include the existing strlen-armv7.S implementation. We rewrite _ISA_ARMV7 in both strlen.S and strlen-stub.c to use the underlying existing underlying defintion from arm_asm.h in order to avoide including that file, this is in effect the first step towards a move to ACLE predefines only. Tested by building newlib and comparing libc.a binaries before and after for all permutations of: Architectures: armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2 ISAs: thumb arm Optimization Levels: Os O2 Excluding: armv6s-m -mthumb armv6-m -mthumb armv6zk -mthumb armv6z -mthumb armv6k -mthumb armv6j -mthumb
* [ARM] Rename strlen to strlen-stub.cMarcus Shawcroft2015-11-133-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to maintain consistency both within machine/arm and between machine/arm and machine/aarch64, rename the 'c' stub to -stub.c. Tested by building newlib and comparing libc.a binaries before and after for all permutations of: Architectures: armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2 ISAs: thumb arm Optimization Levels: Os O2 Excluding: armv6s-m -mthumb armv6-m -mthumb armv6zk -mthumb armv6z -mthumb armv6k -mthumb armv6j -mthumb
* [ARM] Reorganize strlen selection.Marcus Shawcroft2015-11-135-190/+16
| | | | | Remove automake and autoconf selection of strchr implementation in favour of conditional compilation in strlen.c.
* [ARM] Refactor strlen.c #if nesting.Marcus Shawcroft2015-11-131-26/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch flattens the condition code selection used in strlen in an attempt to make the guarding condition for each alternative implementation clearer and to structure the logic in a manner that makes it easier to maintain complementary logic between the alternative 'C' and assembler implementations. Tested by building newlib and comparing libc.a binaries before and after for all permutations of: Architectures: armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2 ISAs: thumb arm Optimization Levels: Os O2 Excluding: armv6s-m -mthumb armv6-m -mthumb armv6zk -mthumb armv6z -mthumb armv6k -mthumb armv6j -mthumb
* Add support for ARC to newlibAnton Kolesov2015-11-1238-0/+10003
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newlib/ChangeLog: 2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com> * configure.host: Add ARC support. * libc/include/machine/setjmp.h: Likewise. * libc/machine/configure: Likewise. * libc/machine/configure.in: Likewise. * libc/machine/arc/Makefile.am: Likewise. * libc/machine/arc/Makefile.in: Likewise. * libc/machine/arc/aclocal.m4: Likewise. * libc/machine/arc/asm.h: Likewise. * libc/machine/arc/configure: Likewise. * libc/machine/arc/configure.in: Likewise. * libc/machine/arc/memcmp-bs-norm.S: Likewise. * libc/machine/arc/memcmp-stub.c: Likewise. * libc/machine/arc/memcmp.S: Likewise. * libc/machine/arc/memcpy-archs.S: Likewise. * libc/machine/arc/memcpy-bs.S: Likewise. * libc/machine/arc/memcpy-stub.c: Likewise. * libc/machine/arc/memcpy.S: Likewise. * libc/machine/arc/memset-archs.S: Likewise. * libc/machine/arc/memset-bs.S: Likewise. * libc/machine/arc/memset-stub.c: Likewise. * libc/machine/arc/memset.S: Likewise. * libc/machine/arc/setjmp.S: Likewise. * libc/machine/arc/strchr-bs-norm.S: Likewise. * libc/machine/arc/strchr-bs.S: Likewise. * libc/machine/arc/strchr-stub.c: Likewise. * libc/machine/arc/strchr.S: Likewise. * libc/machine/arc/strcmp-archs.S: Likewise. * libc/machine/arc/strcmp-stub.c: Likewise. * libc/machine/arc/strcmp.S: Likewise. * libc/machine/arc/strcpy-bs-arc600.S: Likewise. * libc/machine/arc/strcpy-bs.S: Likewise. * libc/machine/arc/strcpy-stub.c: Likewise. * libc/machine/arc/strcpy.S: Likewise. * libc/machine/arc/strlen-bs-norm.S: Likewise. * libc/machine/arc/strlen-bs.S: Likewise. * libc/machine/arc/strlen-stub.c: Likewise. * libc/machine/arc/strlen.S: Likewise. * libc/machine/arc/strncpy-bs.S: Likewise. * libc/machine/arc/strncpy-stub.c: Likewise. * libc/machine/arc/strncpy.S: Likewise.
* AArch64: Tune memcpyWilco Dijkstra2015-11-121-24/+32
| | | | | * newlib/libc/machine/aarch64/memcpy.S (memcpy): Further tuning for performance.
* Avoid .eh_frame in ARM newlib.Joseph Myers2015-11-127-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | ARM newlib has various strcmp implementations that use .cfi_* directives to generate unwind information. The effect of this is that the generated objects contain .eh_frame sections. However, ARM uses its own unwind info format, not .eh_frame, which is generated by ARM-specific directives, not .cfi_*. The .eh_frame sections are useless, but also not removed by strip and may be loaded into memory at runtime. This patch fixes this by using .cfi_sections .debug_frame (as in glibc) so that the directives generate .debug_frame instead. .debug_frame is useful for the debugger, can be removed by strip, and is not loaded into memory at runtime. * libc/machine/arm/strcmp-arm-tiny.S: Use .cfi_sections .debug_frame. * libc/machine/arm/strcmp-armv4.S: Likewise. * libc/machine/arm/strcmp-armv4t.S: Likewise. * libc/machine/arm/strcmp-armv6.S: Likewise. * libc/machine/arm/strcmp-armv6m.S: Likewise. * libc/machine/arm/strcmp-armv7.S: Likewise. * libc/machine/arm/strcmp-armv7m.S: Likewise.
* Reorganize memchr selection.cygwin-2_3_0-releaseMarcus Shawcroft2015-11-066-124/+107
| | | | | | | | | | | | | | | | | | | | | The patch cleans up the auto configury mechanism used to select different implementations of memchr for various architecture versions. The approach here is to remove the selection of memchr within automake and instead use complimentary logic in memchr-stub.c and memchr.S to choose between the gerneric memchr.c implementation or one of the architecture specific implementations. This patch also changes the selection criteria inline with the previous proposal here: https://sourceware.org/ml/newlib/2015/msg00752.html but using the ACLE predefines. Regressed for armv7-a armv5 armv8-a, correct selection of memcpy implementation by manual inspection of a test program built for these three architectures.
* Reorganize memcpy selection.Marcus Shawcroft2015-11-066-296/+81
| | | | | | | | | | | | | | | | | | | This patch cleans up the auto configury mechanism used to select different implementations of memcpy for various architecture versions. The approach here is to remove the selection of memcpy within automake and instead use complimentary logic in memcpy-stub.c and memcpy.S to choose between the generic memcpy.c implemenation or one of the architecture specific memcpy*.S implemenations. Regressed for armv7-a armv5 armv8-a, correct selection of memcpy implementation by manual inspection of a test program built for these three architectures. This revised patch flips the remaining preprocessor logic in memcpy-stub.c to use ACLE defines as requested in the previous review and removes the now disused HAVE_ARMV7A and HAVE_ARMV8A configure.in support.
* [ARM] Select appropriate memcpy implementation for ARMv8-a.Marcus Shawcroft2015-11-035-14/+97
| | | | | | | | | The newlib configury logic that detects architecture version and chooses an appropriate memcpy implementation does not consider ARMv8-a. This patch adds configury logic to detect ARMv8-a along with the associated changes in Makefile.am and memcpy.
* Move duplicated documentation rules to Makefile.sharedJeff Johnston2015-11-026-4165/+2990
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Also, harmonize libm to use CHEWOUT_FILES like libc, rather than chobj. Update documentation appropriately. * HOWTO: Update. * Makefile.shared: Move documentation rules to here... * libc/argz/Makefile.am: ... from here ... * libc/ctype/Makefile.am: ... and here. * libc/errno/Makefile.am: Ditto. * libc/iconv/Makefile.am: Ditto. * libc/iconv/ccs/Makefile.am : Ditto. * libc/iconv/ces/Makefile.am: Ditto. * libc/iconv/lib/Makefile.am: Ditto. * libc/locale/Makefile.am: Ditto. * libc/misc/Makefile.am: Ditto. * libc/posix/Makefile.am: Ditto. * libc/reent/Makefile.am: Ditto. * libc/search/Makefile.am: Ditto. * libc/stdio/Makefile.am: Ditto. * libc/stdio64/Makefile.am: Ditto. * libc/stdlib/Makefile.am : Ditto. * libc/string/Makefile.am: Ditto. * libc/syscalls/Makefile.am: Ditto. * libc/time/Makefile.am : Ditto. * libc/unix/Makefile.am: Ditto. * libc/xdr/Makefile.am: Ditto. * libm/common/Makefile.am: Ditto. * libm/complex/Makefile.am: Ditto. * libm/math/Makefile.am: Ditto. * libm/mathfp/Makefile.am: Ditto.
* Improve performance of MIPS memcpy.Steve Ellcey2015-11-021-2/+43
| | | | | * libc/machine/mips/memcpy.S (memcpy): Add word copies for small aligned data.
* Add support for ft32 to newlib.Jeff Johnston2015-09-0414-1911/+9617
|
* libc/machine/cris/sys/signal.h (kill): Declare.Hans-Peter Nilsson2015-09-031-0/+4
|
* strlen-armv7.S: Fix preprocessor checkCorinna Vinschen2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi! I've got the situation, that the function strlen() occurs twice in libc.a (building newlib for ARM-V7a and Size-Optimized). In newlib/libc/machine/arm/strlen.c there are the pre-processor stetements ... #if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \ (defined (__thumb__) && !defined (__thumb2__)) /*...*/ #else #if !(defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__)) /*...*/ #endif and in newlib/libc/machine/arm/strlen-armv7.S the "exclude" begins with /* NOTE: This ifdef MUST match the ones in arm/strlen.c We fallback to the one in arm/strlen.c for size optimised or for older architectures. */ #if defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__) && \ !(defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \ (defined (__thumb__) && !defined (__thumb2__))) But this is not completely contrary to arm/strlen.c (see above)! To fix the logical statement in arm/strlen-armv7.S there are parentheses needed Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Use machine header file for endianness configuration.Andre Vieira2015-08-202-6/+40
| | | | | | | | | | | | | | | newlib/ChangeLog: 2015-07-28 Andre Vieira <andre.simoesdiasvieira@arm.com> * libc/sys/arm/sys/param.h (BIG_ENDIAN, LITTLE_ENDIAN): Moved to machine/endian.h. * libc/machine/arm/machine/param.h (BYTE_ORDER): Idem. * libc/machine/arm/machine/endian.h: New. From ca6efccda91bc6b620b7d96a466b0f1e2f02cfeb Mon Sep 17 00:00:00 2001 From: Andre Simoes Dias Vieira <andsim01@arm.com> Date: Tue, 28 Jul 2015 12:16:20 +0100 Subject: [PATCH 2/2] Move endianness configuration to machine/endian.h
* [AArch64] Rewrite optimized memset.Wilco Dijkstra2015-07-301-191/+184
| | | | | | | | | | | This is an optimized memset for AArch64. Memset is split into 4 main cases: small sets of up to 16 bytes, medium of 16..96 bytes which are fully unrolled. Large memsets of more than 96 bytes align the destination and use an unrolled loop processing 64 bytes per iteration. Memsets of zero of more than 256 use the dc zva instruction, and there are faster versions for the common ZVA sizes 64 or 128. STP of Q registers is used to reduce codesize without loss of performance.
* [AArch64] Reverting recent optimized memset().Marcus Shawcroft2015-07-151-184/+191
|
* [AArch64] Optimized memset.Wilco Dijkstra2015-07-131-191/+184
| | | | | | | | | | | This is an optimized memset for AArch64. Memset is split into 4 main cases: small sets of up to 16 bytes, medium of 16..96 bytes which are fully unrolled. Large memsets of more than 96 bytes align the destination and use an unrolled loop processing 64 bytes per iteration. Memsets of zero of more than 256 use the dc zva instruction, and there are faster versions for the common ZVA sizes 64 or 128. STP of Q registers is used to reduce codesize without loss of performance.
* [AArch64] Optimized memcpy.Wilco Dijkstra2015-07-131-134/+161
| | | | | | | | | | This is an optimized memcpy for AArch64. Copies are split into 3 main cases: small copies of up to 16 bytes, medium copies of 17..96 bytes which are fully unrolled. Large copies of more than 96 bytes align the destination and use an unrolled loop processing 64 bytes per iteration. In order to share code with memmove, small and medium copies read all data before writing, allowing any kind of overlap. On a random copy test memcpy is 40.8% faster on A57 and 28.4% on A53.
* [AArch64] Optimized memmove.Wilco Dijkstra2015-07-131-282/+108
| | | | | | | This is an optimized memmove for AArch64. All copies of up to 96 bytes and all backward copies are done by the new memcpy. The only remaining case is large forward copies which are done in the same way as the memcpy loop, but copying from the end rather than the start.
* Update the assembler code to support old ARM architectures.Hale Wang2015-06-016-183/+179
| | | | | | | | | | | | * libc/machine/arm/aeabi_memmove-arm.S (__aeabi_memmove): Update the assembler implementation. * libc/machine/arm/aeabi_memmove-thumb.S (__aeabi_memmove): Ditto. * libc/machine/arm/aeabi_memmove-thumb2.S (__aeabi_memmove): Ditto. * libc/machine/arm/aeabi_memset-arm.S (__aeabi_memset): Ditto. * libc/machine/arm/aeabi_memset-thumb.S (__aeabi_memset): Ditto. * libc/machine/arm/aeabi_memset-thumb2.S (__aeabi_memset): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* For the RX port, avoid using string instructions when ↵Nick Clifton2015-04-2312-0/+235
| | | | | | | | | | | | | | | | | | | __RX_DISALLOW_STRING_INSNS__ is defined. * rx/crt0.S (_start): If string instructions are not allowed, avoid using SMOVF. * libc/machine/rx/memchr.S: Add non-string insn using version. * libc/machine/rx/memcpy.S: Likewise. * libc/machine/rx/memmove.S: Likewise. * libc/machine/rx/mempcpy.S: Likewise. * libc/machine/rx/strcat.S: Likewise. * libc/machine/rx/strcmp.S: Likewise. * libc/machine/rx/strcpy.S: Likewise. * libc/machine/rx/strlen.S: Likewise. * libc/machine/rx/strncat.S: Likewise. * libc/machine/rx/strncmp.S: Likewise. * libc/machine/rx/strncpy.S: Likewise.
* * libc/machine/mips/memset.S: Add support for mips32r6/mips64r6.Steve Ellcey2015-03-031-0/+58
|
* * libc/machine/mips/memcpy.S: Add support for mips32r6/mips64r6.Steve Ellcey2015-03-031-14/+165
|
* 2015-02-26 Steve Ellcey <sellcey@imgtec.com>Steve Ellcey2015-02-261-108/+108
| | | | | * libc/machine/mips/memcpy.S: Fix macro indentation and typos in comments.
* * libc/machine/arm/aeabi_memclr.c: New file to supportCorinna Vinschen2015-02-178-5/+542
| | | | | | | | | | | | aeabi_memclr. * libc/machine/arm/aeabi_memset.c: New file to support aeabi_memset. * libc/machine/arm/aeabi_memset-soft.S: Ditto. * libc/machine/arm/aeabi_memset-arm.S: Ditto. * libc/machine/arm/aeabi_memset-thumb.S: Ditto. * libc/machine/arm/aeabi_memset-thumb2.S: Ditto. * libc/machine/arm/Makefile.am: Add dependencies. * libc/machine/arm/Makefile.in: Regenerated.
* * libc/machine/arm/aeabi_memmove.c: New file to supportCorinna Vinschen2015-02-177-3/+340
| | | | | | | | | | aeabi_memmove. * libc/machine/arm/aeabi_memmove-soft.S: Ditto. * libc/machine/arm/aeabi_memmove-arm.S: Ditto. * libc/machine/arm/aeabi_memmove-thumb.S: Ditto. * libc/machine/arm/aeabi_memmove-thumb2.S: Ditto. * libc/machine/arm/Makefile.am: Add dependencies. * libc/machine/arm/Makefile.in: Regenerated.
* * libc/include/complex.h (cabsl): Add prototype.Nick Clifton2015-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cimagl): Add prototype. (creall): Add prototype. * libc/include/ieeefp.h: Include float.h. (EXT_EXPBITS, EXT_FRACHBITS, EXT_FRACLBITS) (EXT_EXP_INFNAN. EXT_EXP_BIAS, EXT_FRACBITS): Define. (struct ieee_ext, union ieee_ext_u): New types for long double support. * libc/include/math.h (finitel): Add prototype. (hypotl): Add prototype. (sqrtl): Add prototype. * libm/common/Makefile.am (lsrc): Add sl_finite.c. * libm/common/Makefile.in: Regenerate. * libm/common/fdlibm.h (__ieee754_hypotl): Add prototype. * libm/common/hypotl.c (hypotl): Add implementation for when long double is larger than double. * libm/common/sqrtl.c (sqrtl): Likewise. * libm/common/sl_finite.c: New file. Adds implementation of the finitel function. * libm/complex/Makefile.am (lsrc): Define. (libcomplex_la_SOURCES): Add lsrc. (lib_a_SOURCES): Add lsrc. * libm/complex/Makefile.in: Regenerate. * libm/complex/cabs.c: Add documentation of cabsl function. * libm/complex/cimag.c: Add documentation of cimagl function. * libm/complex/creall.c: Add documentation of creall function. * libm/complex/cabsl.c: New file. Adds implementation of the cabsl function. * libm/complex/cimagl.c: New file. Adds implementation of the cimagl function. * libm/complex/creall.c: New file. Adds implementation of the creall function. * libm/math/Makefile.am (lsrc): Define. (libmath_la_SOURCES): Add lsrc. (lib_a_SOURCES): Add lsrc. * libm/math/Makefile.in: Regenerate. * libm/math/el_hypot.c: New file. Adds implementation of the __ieee754_hypotl function.
* Complete action from 2001-12-18:Corinna Vinschen2015-01-2317-697/+0
| | | | * libc/machine/i386/f_*: Remove duplicate files.
* * COPYING.LIBGLOSS: Add Controls and Data Services copyright.Eric Botcazou2015-01-2113-2/+7993
| | | | | | | | | | | | | | | | * COPYING.NEWLIB: Likewise. libgloss/ * configure.in: Add Visium support. * configure: Regenerate. * visium/: New directory. newlib/ * configure.host: Add Visium support. * libc/machine/configure.in: Likewise. * libc/machine/configure: Regenerate. * libc/machine/visium/: New directory. * libc/include/machine/setjmp.h (_JBLEN): Define for Visium. * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Likewise. * libc/include/machine/time.h (_CLOCKS_PER_SEC_): Likewise.
* * libc/machine/aarch64/strlen.S (strlen): Improve performance.Corinna Vinschen2015-01-201-69/+171
|
* * libc/machine/aarch64/strcpy.S (strcpy): Further performanceRichard Earnshaw2015-01-065-125/+250
| | | | | | | | improvements. Adjust to allow building as stpcpy. * libc/machine/aarch64/stpcpy.S: New file. * libc/machine/aarch64/stpcpy-stub.c: New file. * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Build stpcpy. * libc/machine/aarch64/Makefile.in: Regenerated.