arc: Get rid of handwritten string routines
U-Boot is a bit special piese of software because it is being
only executed once on power-on as compared to operating system
for example. That's why we don't care much about performance
optimizations instead we're more concerned about size. And up-to-date
compilers might produce much smaller code compared to
performance-optimized routines copy-pasted from the Linux kernel.
Here's an example:
------------------------------->8--------------------------
--- size_asm_strings.txt
+++ size_c_strings.txt
@@ -1,2 +1,2 @@
text data bss dec hex filename
- 121260 3784 3308 128352 1f560 u-boot
+ 120448 3784 3308 127540 1f234 u-boot
------------------------------->8--------------------------
See we were able to shave off ~800 bytes of .text section.
Also usage of string routines implemented in C gives us an ability
to support more HW flavors for free: generated instructions will match
our target as long as correct compiler option is used.
Signed-off-by:
Alexey Brodkin <abrodkin@synopsys.com>
Showing
- arch/arc/include/asm/string.h 0 additions, 26 deletionsarch/arc/include/asm/string.h
- arch/arc/lib/Makefile 0 additions, 7 deletionsarch/arc/lib/Makefile
- arch/arc/lib/memcmp.S 0 additions, 123 deletionsarch/arc/lib/memcmp.S
- arch/arc/lib/memcpy-700.S 0 additions, 63 deletionsarch/arc/lib/memcpy-700.S
- arch/arc/lib/memset.S 0 additions, 62 deletionsarch/arc/lib/memset.S
- arch/arc/lib/strchr-700.S 0 additions, 141 deletionsarch/arc/lib/strchr-700.S
- arch/arc/lib/strcmp.S 0 additions, 97 deletionsarch/arc/lib/strcmp.S
- arch/arc/lib/strcpy-700.S 0 additions, 67 deletionsarch/arc/lib/strcpy-700.S
- arch/arc/lib/strlen.S 0 additions, 80 deletionsarch/arc/lib/strlen.S
arch/arc/lib/memcmp.S
deleted
100644 → 0
arch/arc/lib/memcpy-700.S
deleted
100644 → 0
arch/arc/lib/memset.S
deleted
100644 → 0
arch/arc/lib/strchr-700.S
deleted
100644 → 0
arch/arc/lib/strcmp.S
deleted
100644 → 0
arch/arc/lib/strcpy-700.S
deleted
100644 → 0
arch/arc/lib/strlen.S
deleted
100644 → 0
Please register or sign in to comment