summaryrefslogtreecommitdiff
path: root/libc/string/arc
AgeCommit message (Collapse)Author
2023-11-10arc: remove read ahead in asm strcmp code for ARCHSPavel Kozlov
Remove read ahead in the per-word compare loop as it can cause a segmentation fault in certain circumstances (when a string crosses a page boundary). For baremetal this relaxed approach is suitable but in Linux with MMU we should be more restrictive. Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
2022-10-14arc: add optimized string functions for ARCv3Pavel Kozlov
Add ability to use optimized versions of string functions for ARCv3 32-bit CPUs with UCLIBC_HAS_STRING_ARCH_OPT option. Add optimized memcpy/memset/memcmp code for ARCv3 CPUs based on the code from newlib and adapt for ARCv3 existed optimized strchr/strcmp/strcpy/strlen. Link to the Synopsys newlib repo with code for ARCv3 on GitHub: https://github.com/foss-for-synopsys-dwc-arc-processors/newlib Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
2017-08-20arc: Merge ARCv2 string routines in generic ARC .S filesAlexey Brodkin
In cde74b83f9b2 "ARC: remove special CFLAGS/LDFLAGS handling" we got rid of CONFIG_ARC_CPU_HS which was used to select ARCv2-specific implementation of optimized string routines. So now ARCv2-tuned memset/memcpy/strcmp are not used, instead those for ARC700 used for both ARC700 and ARCHS. Without uClibc config option we may only tell which CPU type we're targeting by built-in defines of GCC. I.e. no more conditional file inclusion in Makefiles. That leaves us only one option - merge both implementations in 1 file and use ifdefs. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2016-11-13ARC: string: handle gcc 6.x macro changesVineet Gupta
In gcc 6.x cleanup, the macros got renamed. (Need to support the old toggle for some more time) Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-07-22ARCv2: update memset() so it could be used without double load/storesClaudiu Zissulescu
Existing version of memset() relies on existence of 64-bit load/stores. While ARC HS38 may not have those instructions implemented in SoC. Proposed implementation checks if "-mno-ll64" option was passed to gcc (for ARCv2 "-mll64" is set implicitly by default) by checking __LL64__ definition and if it is not defined uses 32-bit load/stores. Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com>
2015-02-20ARCv2: optimised string routinesVineet Gupta
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20ARCv2 ISA supportVineet Gupta
This is next gen Instruction Set Architecture from Synopsys and basis for the ARC HS family of processors. http://www.synopsys.com/dw/ipdir.php?ds=arc-hs38-processor&elq_mid=5732&elq_cid=458802 http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/arc-hs/Pages/default.aspx Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20string: Add ARC supportJoern Rennecke
Signed-off-by: Joern Rennecke <joern.rennecke@embecosm.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>